Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default 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



.



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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"