When Using Format(Now(), "yyyymmmddhhmm") get wrong number of arguments or invalid property assignme

C

Connie

I am using the following code to create a file name with a date and
time stamp. I get a "wrong number of arguments or invalid property
assignment" when I run the code. For some reason the compiler doesn't
like the Format(Now(), "yyyymmmddhhmm"). Can anyone tell me why? Any
help would be appreciated!

Connie

Dim FName as String
Dim VersionNo As String

FName = "\Upload Hourly " & VersionNo & Format(Now(), "yyyymmmddhhmm")
 
N

NickHK

Works for me :
?Format(Now(), "yyyymmmddhhmm")
2006Nov081559

Sure the error is on that part ?
What is the value of VersionNo ?

And what do you expect FName to equal ?

NickHK
 
C

Connie

Thanks for your response, Nick. I figured out that I have a macro
named Format which was causing the inconsistency.

Thanks again.
Connie
 

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


Top