Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default When Using Format(Now(), "yyyymmmddhhmm") get wrong number of arguments or invalid property assignment Error

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")

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default When Using Format(Now(), "yyyymmmddhhmm") get wrong number of arguments or invalid property assignment Error

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

"Connie" wrote in message
ups.com...
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")



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default When Using Format(Now(), "yyyymmmddhhmm") get wrong number of arguments or invalid property assignment Error

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

Thanks again.
Connie

NickHK wrote:
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

"Connie" wrote in message
ups.com...
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")


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Error: Wrong arguments or Invalid property Brent E Excel Discussion (Misc queries) 3 May 1st 07 07:11 PM
Error: Wrong number of argument or invalid property assignment? Mike Excel Programming 1 July 11th 06 02:33 PM
Wrong number of arguments or invalid property assignment [email protected] Excel Programming 1 June 27th 06 04:42 PM
Wrong Number of Arguments or Invalid Property Assignment??? tbassngal Excel Programming 3 January 11th 06 04:01 PM
Wrong number of Arguments or Invalid property assignment Turin[_2_] Excel Programming 1 July 17th 05 09:52 PM


All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"