Default a workbook to save as a xlsm (macro-enabled) in 2007


G

Guest

Is there a way to have a single workbook default to save as a xlsm
(macro-enabled) file type instead of xlsx when the template it was created
from was a xltm (macro-enabled) template?

Currently it brings up a message about saving macros in a macro-free
workbook. Most of our uses will not even read/understand this and will just
save the workbook without the macros.

We would prefer not to change the default save type for workbooks from xlsx
if we don't have to.
 
Ad

Advertisements

Ad

Advertisements

R

Ron de Bruin

Maybe not a very good way but
You can try this in the thisworkbook module of the template.

Private Sub Workbook_Activate()
If Me.Path = "" Then Application.DefaultSaveFormat = xlOpenXMLWorkbookMacroEnabled
End Sub


Private Sub Workbook_Deactivate()
If Me.Path <> "" Then Application.DefaultSaveFormat = xlOpenXMLWorkbook
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top