ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I use a macro to save to a specific drive in Excel? (https://www.excelbanter.com/excel-programming/338045-how-do-i-use-macro-save-specific-drive-excel.html)

Meredith

How do I use a macro to save to a specific drive in Excel?
 
I wrote a macro in excel to facilitate creating monthly reports. I want it
to save to a new folder each month (ie. the current monthly folder), but I am
not sure how to write a changing "save as" formula.

Tom Ogilvy

How do I use a macro to save to a specific drive in Excel?
 
Something along the lines of :

Thisworkbook.SaveAs "C:\RootFolder\" & Format(Date,"yyyymmm") &
"\Basename.xls"

might give you some ideas.
--
Regards,
Tom Ogilvy

"Meredith" wrote in message
...
I wrote a macro in excel to facilitate creating monthly reports. I want

it
to save to a new folder each month (ie. the current monthly folder), but I

am
not sure how to write a changing "save as" formula.




FSt1

How do I use a macro to save to a specific drive in Excel?
 
hi,
formulas return values. they cannot perform actions such save as.
add this to your macro at an appropriate place.

Application.Dialogs(xlDialogSaveAs).Show

regards
FSt1

"Meredith" wrote:

I wrote a macro in excel to facilitate creating monthly reports. I want it
to save to a new folder each month (ie. the current monthly folder), but I am
not sure how to write a changing "save as" formula.



All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com