Forum 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?
For upcoming training course dates see: Pricing & availability
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.
|
