Auto naming

G

Guest

I want to make a macro that when it runs it exports a query into an excel
worksheet. I have working but i want it to name it vacation( and the current
date) i tried vacaton_Date( ).xls, but it names it exactly that. Is there a
way to name it with the system date attached? Also i would like to have this
run once a week auto matically is that possible and if so how?

thanks
 
S

Steve Schapel

Dean,

Try it something like this in the File Name argument of your macro...
="C:\YourFolder\vacation" & Format(Date(),"yymmdd") & ".xls"

To run it automatically at pre-determined times, you can use Windows
task manager to schedule it. The Command Line will be the equivalent of
something like this...
"C:\PathToAccess\Msaccess.exe" "C:\PathToDb\MyDb.mdb" /x NameOfMacro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top