Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename Worksheet Tab as File Name Using a Macro Cue Excel Discussion (Misc queries) 10 December 24th 09 06:38 PM
rename excel file name TJ Excel Discussion (Misc queries) 8 June 27th 09 01:56 PM
problem after rename of file vcff Excel Discussion (Misc queries) 7 January 25th 07 01:10 AM
Rename Macro rmpete Excel Discussion (Misc queries) 3 February 11th 06 10:24 PM
How to set SAVE AS file name to equal A1 contents when rename file E Excel Discussion (Misc queries) 0 October 19th 05 08:36 PM


All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"