Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default How do I save a spreadsheet from a macro?

I need to create a macro to "save as" the spreadsheet to a specific
folder, with a unique (date/time based) file name.

Is there a "save as" command that can be used from a macro so that
this can be done? I can sort out the file naming procedure, unless
you have any suggestions on that as well.

Thanks,

TK

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How do I save a spreadsheet from a macro?

For example:

Sub cortez()
s1 = "C:\Documents and Settings\User\Desktop"
s2 = "\Bookx"
s3 = Format(Now(), "mm_dd_yyyy") & ".xls"

ChDir s1
ActiveWorkbook.SaveAs Filename:=s1 & s2 & s3
End Sub


--
Gary''s Student
gsnu200709


"Cortez" wrote:

I need to create a macro to "save as" the spreadsheet to a specific
folder, with a unique (date/time based) file name.

Is there a "save as" command that can be used from a macro so that
this can be done? I can sort out the file naming procedure, unless
you have any suggestions on that as well.

Thanks,

TK


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default How do I save a spreadsheet from a macro?

On Mar 5, 10:45 am, Gary''s Student
wrote:
For example:

Sub cortez()
s1 = "C:\Documents and Settings\User\Desktop"
s2 = "\Bookx"
s3 = Format(Now(), "mm_dd_yyyy") & ".xls"

ChDir s1
ActiveWorkbook.SaveAs Filename:=s1 & s2 & s3
End Sub

--

I came back to reply that I found it:

ActiveWorkbook.SaveAs Filename:="etc"

and saw that you gave me the whole thing. Thank you very much.

TK

Gary''s Student
gsnu200709

"Cortez" wrote:
I need to create a macro to "save as" the spreadsheet to a specific
folder, with a unique (date/time based) file name.


Is there a "save as" command that can be used from a macro so that
this can be done? I can sort out the file naming procedure, unless
you have any suggestions on that as well.


Thanks,


TK



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 to Save without the Save Message Ellen G Excel Discussion (Misc queries) 4 February 23rd 07 08:52 PM
Stopping spreadsheet save John New Users to Excel 2 September 15th 06 09:19 AM
how do i save spreadsheet to cdr disc Karen Charts and Charting in Excel 1 August 15th 06 03:46 AM
save spreadsheet as web page bobmarshall043 Excel Discussion (Misc queries) 0 October 6th 05 08:35 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM


All times are GMT +1. The time now is 02:33 PM.

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

About Us

"It's about Microsoft Excel"