Macro to save worksheet as separate file?

aythieriot

New Member
Joined
Apr 19, 2011
Messages
7
Hello again,

So I've got my inventory model working functionally (finally...). One last issue remains: The point where this model is used is not the same location where the final output is to be printed out. Therefore, I want my final output page to be sent by itself (not a fully macro-encoded file) as a smaller fine to be printed off at the central office.

Is there a way to save my final output page as a separate file, with a dialogue box where the user can put in today's date to name the order (if not done automatically via =today() somehow?

Thanks,
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Code:
Sub SaveSheet()
    Sheets("Sheet1").SaveAs Filename:="C:\" & DateValue(Now) & ".xlsx"
End Sub
 
Last edited:
Upvote 0
Try like this. Change Output to the name of the sheet

Rich (BB code):
Sub SaveMe()
Sheets("Output").Copy
With ActiveWorkbook
    .SaveAs Filename:=Format(Date, "ddmmyyyy") & ".xls)"
    .Close
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,558
Members
452,928
Latest member
101blockchains

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