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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com