Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |