Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ALT+ENTER no longer works | Excel Discussion (Misc queries) | |||
Code No Longer Works in 2007 | Excel Programming | |||
folderexists code no longer works after moving to excel 2003 | Excel Programming | |||
VB6 Excel 97 code no longer works if Win2K SP3/4 applied. | Excel Programming | |||
Macro no longer works in XP | Excel Programming |