Format Date in Save AS function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?
 
You have probably used Format as the name of a routine you wrote. Find that
routine and change the name.
 
I am receiving a strange error message when trying to run the below script:

ActiveWorkbook.SaveAS "c:\Daily Reports for DP\NPP_" & Format(Date,
"mmddyy")

The error i get highlights "Format" and a msg box says:

Compile Error:

Wrong number of arguments or incalid property assignment

Any ideas as to what is wrong?

I'm not able to reproduce your error, your code (I modified the path a
bit for my machine) worked just fine for me. Tested on both xl2007 and
xl2003.
 

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

Similar Threads


Back
Top