Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Format code no longer works

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Format code no longer works

How is Fname declared? What is its value before the line below is
executed?

In article ,
CLR wrote:

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3

  #3   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Format code no longer works

That fname thing was from the old workbook...

Actually, this is the code I'm trying to use now, which works fine......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & ".xls"

It's when I try to add the date is when I get the problem......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & Format(Date,
"_Mmm_dd_yyyy") & ".xls"

Vaya con Dios,
Chuck, CABGx3




"JE McGimpsey" wrote:

How is Fname declared? What is its value before the line below is
executed?

In article ,
CLR wrote:

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Format code no longer works

It sounds like you have created a custom sub or function with the name
FORMAT. If so, rename it or delete it.

--
Regards,
Tom Ogilvy



"CLR" wrote:

That fname thing was from the old workbook...

Actually, this is the code I'm trying to use now, which works fine......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & ".xls"

It's when I try to add the date is when I get the problem......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & Format(Date,
"_Mmm_dd_yyyy") & ".xls"

Vaya con Dios,
Chuck, CABGx3




"JE McGimpsey" wrote:

How is Fname declared? What is its value before the line below is
executed?

In article ,
CLR wrote:

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3


  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Format code no longer works

Indeed, you are correct Tom......changed the name, solved the
problem...........many many thanks, kind Sir!

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote in message
...
It sounds like you have created a custom sub or function with the name
FORMAT. If so, rename it or delete it.

--
Regards,
Tom Ogilvy



"CLR" wrote:

That fname thing was from the old workbook...

Actually, this is the code I'm trying to use now, which works fine......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & ".xls"

It's when I try to add the date is when I get the problem......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName &

Format(Date,
"_Mmm_dd_yyyy") & ".xls"

Vaya con Dios,
Chuck, CABGx3




"JE McGimpsey" wrote:

How is Fname declared? What is its value before the line below is
executed?

In article ,
CLR wrote:

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install

of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property

assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3





  #6   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 594
Default Format code no longer works

Indeed, you are correct Tom......changed the name, solved the
problem...........many many thanks, kind Sir!

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote in message
...
It sounds like you have created a custom sub or function with the name
FORMAT. If so, rename it or delete it.

--
Regards,
Tom Ogilvy



"CLR" wrote:

That fname thing was from the old workbook...

Actually, this is the code I'm trying to use now, which works fine......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName & ".xls"

It's when I try to add the date is when I get the problem......
ActiveWorkbook.SaveAs FileName:=CurrentPath & "\" & MyName &

Format(Date,
"_Mmm_dd_yyyy") & ".xls"

Vaya con Dios,
Chuck, CABGx3




"JE McGimpsey" wrote:

How is Fname declared? What is its value before the line below is
executed?

In article ,
CLR wrote:

Hi All.........

I've used this line of code in past workbooks and it worked fine for
appending a date on the end of a filename

Fname = Fname & Format(Date, "_Mmm_dd_yyyy")

Now, I'm trying the same thing in a new workbook, after a re-install

of my
XL97, and I get the following error msg

"Compile Error,,,Wrong number of arguments or invalid property

assignment"

Anybody know what the trouble might be?

TIA
Vaya con Dios,
Chuck, CABGx3





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
ALT+ENTER no longer works Dale Excel Discussion (Misc queries) 2 March 6th 07 03:39 AM
Code No Longer Works in 2007 Chaplain Doug Excel Programming 2 February 6th 07 06:12 PM
folderexists code no longer works after moving to excel 2003 sdharris - ExcelForums.com Excel Programming 1 May 2nd 05 09:57 AM
VB6 Excel 97 code no longer works if Win2K SP3/4 applied. Tim R[_3_] Excel Programming 5 October 10th 04 06:24 AM
Macro no longer works in XP C.B.[_2_] Excel Programming 1 December 14th 03 10:19 PM


All times are GMT +1. The time now is 08:35 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"