![]() |
Setting a path to a folder
I have created a macro that checks if a folder is present and if it isn't it
creates it. The macro continues to save the active workbook. The creation of the folder works great but the the workbook is being saved in mydocuments rather than the folder created. How do I code to save it in the folder created? I'm pretty sure it just involves setting the path but i'm not sure on the syntax thanks in advance |
Setting a path to a folder
I've solved it using chdir
"Boots" wrote: I have created a macro that checks if a folder is present and if it isn't it creates it. The macro continues to save the active workbook. The creation of the folder works great but the the workbook is being saved in mydocuments rather than the folder created. How do I code to save it in the folder created? I'm pretty sure it just involves setting the path but i'm not sure on the syntax thanks in advance |
Setting a path to a folder
Something like
Activeworkbook.SaveAs myPath & "\" & myFilename where myPath is the path you checked/created. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Boots" wrote in message ... I have created a macro that checks if a folder is present and if it isn't it creates it. The macro continues to save the active workbook. The creation of the folder works great but the the workbook is being saved in mydocuments rather than the folder created. How do I code to save it in the folder created? I'm pretty sure it just involves setting the path but i'm not sure on the syntax thanks in advance |
All times are GMT +1. The time now is 02:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com