View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tim_S[_2_] Tim_S[_2_] is offline
external usenet poster
 
Posts: 3
Default Excell macro Date help

Ok this works great.

Now another big question is how can I tell if an Excel document is open and
locked before I do a save as

For instance;
I have 1.xls open and want to save it as 2.xls but joe another user has
2.xls open. I get an error in the macro when the macro tries to save it.

Thanks




"Tim_S" wrote in message
...
I made a macro to perform a "save as" and give it a file name as you see
below. I now need it to create the file name based on the date ...

ActiveWorkbook.SaveAs "c:\mypath\currentdump.xls"

I need it to save the file as the followint format.. (replace the mmddyyyy
with the date...)

ActiveWorkbook.SaveAs "c:\mypath\mmddyyyy.xls"

What do I need to do to accomplish this?

Thanks