VBA Date

C

Craig

If you assign the code VBA.Date() to something, it will
return the date as such: 11/4/2003

I want to know if there is any other syntax that will
return a date in a format that does not have slashes (or
any other character that would make an invalid file name)

i.e. a date that looks like: 11042003 or something like
that

thank you

Craig
[email protected]
 
D

Dev Ashish

I want to know if there is any other syntax that will
return a date in a format that does not have slashes (or
any other character that would make an invalid file name)

Use the Format function.

?vba.Format$(Now(), "mmddyyyy")

-- Dev
 
Top