98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » File manipulation
File manipulation
Resolved · Low Priority · Version 2003
Chris has attended:
Excel VBA Intro Intermediate course
File manipulation
How can I take a list of filenames and paths within Excel and use VBA to copy each file to a specific location?
RE: File manipulation
Hi Chris
Thanks for your question
You can save your file using the saveas method of the workbook object
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Development\My Documents\" & strFolder & "\" & strFile & ".xls"
strTrust is a folder in mydocuments and strFile is the file name
If you want you can create a folder using the MkDir commmand
MkDir "C:\Documents and Settings\Development\My Documents\" & strFolder
Hope that helps
Regards
Stephen
Thu 26 Mar 2009: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Recently used file listUnder the File menu, you may find a list of files at the bottom of the menu. These files represent the most recently used Excel spreadsheets. This file list provides a quick way for you to access your files. |