Saveas macro

Brucelee

New Member
Joined
Apr 9, 2002
Messages
7
HI could someone help me please,
I want to make a SAVE AS macro so it brings up the save box, I f i record one it just saves it to where I recorded it, please could someone help please thank you.

P.S. would it also be possible to just save the worksheet instead if the whole workbook?
If someone has any ideas please help me, much appreciated.
This message was edited by Brucelee on 2002-04-10 09:32
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Here's a sample:

fileSaveName = Application.GetSaveAsFilename(PathToSave, _
fileFilter:="Excel Workbook (*.xls), *.xls")
If fileSaveName <> False Then
Workbooks(NewWB).Activate
ActiveWorkbook.SaveAs fileSaveName
MsgBox "Report saved as " & fileSaveName
Else
Workbooks(NewWB).Activate
ActiveWorkbook.SaveAs PathToSave
MsgBox "Report saved as " & PathToSave
End If

Look up "GetSaveAsFilename" in VBA help.

Tom
 
Upvote 0
Thanks for that, Is it possible to have it automatically save every 7 days as a new workbook
e.g. workbook1/1/2002
workbook7/1/2002
 
Upvote 0
Sure
I don't know how often you open your and intend to save your workbook under a different name.

In the above example, PathToSave is the full path needed to save the workbook...
You could use the current date to generate a filename for you.

For Ex.
You want to save you workbook in C:Weekly
using the current date as part of the filename.

Pathname = "C:Weeklywb & format(now,"mmddyy") & ".xls"

would show the string and save the file as:

C:Weeklywb041002.xls"

Hope this helps..

Tom
 
Upvote 0
What I am doing is a weekly transaction sheet that i want to save a backup copy of products sold in that week so i want it to automatically save every monday as the file name of that date.
Thanks for the last bit it was useful but not quite what i was thinking of.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top