Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
rename file macro
I am exporting from Access to Excel by using a macro in
Access. Access overwrites the file unless you change the name of the worksheet the export created in which case it will create a second worksheet. I can either keep renaming the worksheet after it is created, (which needs to be automated without opening the worksheet manually), or I can just run some kind of auto macro that will look for a sheet named export.xls at some time in the morning after the other macro has created the file and name it to the machine date, i.e. 12032003.xls ? If I can do the later then I can force the macro in Access to run at 00:10 in the morning by a Windows Scheduler I am using and then have that scheduler open this Excel file and close it after renaming the export.xls file (if it exists). This way I can enjoy my weekends? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
rename file macro
You can't rename it using the macro in Access?
Look at the VBA Name function . Name "c:\abcd\export.xls" as "c:\abcd\" & format(date,"yyyymmdd") & ".xls" -- Regards, Tom Ogilvy dtroupe wrote in message ... I am exporting from Access to Excel by using a macro in Access. Access overwrites the file unless you change the name of the worksheet the export created in which case it will create a second worksheet. I can either keep renaming the worksheet after it is created, (which needs to be automated without opening the worksheet manually), or I can just run some kind of auto macro that will look for a sheet named export.xls at some time in the morning after the other macro has created the file and name it to the machine date, i.e. 12032003.xls ? If I can do the later then I can force the macro in Access to run at 00:10 in the morning by a Windows Scheduler I am using and then have that scheduler open this Excel file and close it after renaming the export.xls file (if it exists). This way I can enjoy my weekends? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rename Worksheet Tab as File Name Using a Macro | Excel Discussion (Misc queries) | |||
rename excel file name | Excel Discussion (Misc queries) | |||
problem after rename of file | Excel Discussion (Misc queries) | |||
Rename Macro | Excel Discussion (Misc queries) | |||
How to set SAVE AS file name to equal A1 contents when rename file | Excel Discussion (Misc queries) |