Save As Dialog Box VBA

dimitri

Board Regular
Joined
Nov 8, 2010
Messages
78
Hi,
I'm looking for a code that will bring up the Save As dialog box allowing the user to save the current workbook under a different name. I want the Save As Type to be restricted to an XLSM file and want to force the user to save instead of hitting cancel or the x button.

If this is possible your help would be appreciated. Thanks.

P.S. I will run this code in the Open event of my workbook as I don't want the user to make changes to the original template before saving a copy. But I know this code won't work if Macros are tuned off. Is there a better way to protect my template? (preferably without just saving the file as an excel template)
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Why not just save it as a template? It's not going to give you a save dialog, but user's can't save over the original.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

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