![]() |
Help With Macro
I have written an excel 2003 macro that imports a comma
delimited text file and makes a couple of basic formating changes to it. what I would like to do is find a way that I could save this file with a file name of (current date).xls any help with this would be greatly appreciated. Thanks, Keven |
Help With Macro
Public Sub SaveAsDate()
ActiveWorkbook.SaveAs Filename:= CStr(Format(Now, "mmmm dd yyyy") End Su ----- Keven wrote: ---- I have written an excel 2003 macro that imports a comma delimited text file and makes a couple of basic formating changes to it. what I would like to do is find a way that I could save this file with a file name of (current date).xls any help with this would be greatly appreciated Thanks Keve |
Help With Macro
That save it in a date format, but for some reason in is
saving it as a .txt file, I would like it to save as .xls workbook if that is possible ? Thanks, Keven -----Original Message----- Public Sub SaveAsDate() ActiveWorkbook.SaveAs Filename:= CStr(Format (Now, "mmmm dd yyyy")) End Sub ----- Keven wrote: ----- I have written an excel 2003 macro that imports a comma delimited text file and makes a couple of basic formating changes to it. what I would like to do is find a way that I could save this file with a file name of (current date).xls any help with this would be greatly appreciated. Thanks, Keven . |
Help With Macro
ActiveWorkbook.SaveAs Filename:=CStr(Format(Now, "mmmm dd yyyy")), _
FileFormat:=xlNormal Since you opened a text file and are now saving it again after a few changes, I believe that the SaveAs method uses the same format by default. A normal Excel format is used when the file to be saved is a new one. Therefore, you have to specify the FileFormat argument. This is one of those tricky cases where you have to read the VBA Help topics very carefully. -- Regards, Bill wrote in message ... That save it in a date format, but for some reason in is saving it as a .txt file, I would like it to save as .xls workbook if that is possible ? Thanks, Keven -----Original Message----- Public Sub SaveAsDate() ActiveWorkbook.SaveAs Filename:= CStr(Format (Now, "mmmm dd yyyy")) End Sub ----- Keven wrote: ----- I have written an excel 2003 macro that imports a comma delimited text file and makes a couple of basic formating changes to it. what I would like to do is find a way that I could save this file with a file name of (current date).xls any help with this would be greatly appreciated. Thanks, Keven . |
All times are GMT +1. The time now is 05:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com