Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do I get a macro to save a sheet and set the file name?

I have a spreadsheet that changes daily and needs to save the file
differently each day. The program wont allow you to "save as" then paste
something like the date as the file name. How do I get the macro to change
the filename each time it needs to save. This can be by and increment of say
1?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default how do I get a macro to save a sheet and set the file name?

Here is a typical format for the save:

Sub saversion()
s = Format(Date, "yyyy_mm_dd")
ChDir "C:\Documents and Settings\Owner\Desktop"
ActiveWorkbook.SaveAs Filename:="DailyFile " & s
End Sub


If you run the macro today the file name would be :

DailyFile 2007_09_16.xls
--
Gary''s Student - gsnu200745


"MadasMax" wrote:

I have a spreadsheet that changes daily and needs to save the file
differently each day. The program wont allow you to "save as" then paste
something like the date as the file name. How do I get the macro to change
the filename each time it needs to save. This can be by and increment of say
1?

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
copy the same raws of all sheets from about a 100 file to a new sheet of a book and save the file [email protected] Setting up and Configuration of Excel 0 March 14th 07 02:13 AM
How can I save my sheet in macro FSt1 Excel Discussion (Misc queries) 2 February 10th 07 08:54 AM
Macro Save File (Unique file name) SJC Excel Worksheet Functions 5 October 27th 05 10:09 PM
Q: save a sheet to a file JIM.H. Excel Discussion (Misc queries) 2 October 25th 05 03:12 PM
Macro to save a file as ynissel Excel Discussion (Misc queries) 4 May 26th 05 02:48 PM


All times are GMT +1. The time now is 12:34 PM.

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"