Macro to save as .xlsm

Audiology

Board Regular
Joined
Mar 4, 2009
Messages
171
In the midst of a multi-year research project, I have migrated from Excel 2003 to Excel 2010. My original data file name/save macro read as follows:

\Public Sub SAVE_WORKBOOK()
ThisFile = Range("SDC!H60").Value
ActiveWorkbook.SaveAs Filename:="C:\POSE DATA 2006-7\" & ThisFile
End Sub


The macro no longer works as it saves to the old 2003 file type .xls which is rejected by 2010 because it contains other macros.

In the process of data transfer, using 2010, I need this macro to name the file but specify save as file type .xlsm.

Any guidance is appreciated.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

Code:
Public Sub SAVE_WORKBOOK()
ThisFile = Range("SDC!H60").Value
ActiveWorkbook.SaveAs Filename:="C:\POSE DATA 2006-7\" & ThisFile & ".xlsm", FileFormat:=52
End Sub
 
Upvote 0

Forum statistics

Threads
1,218,252
Messages
6,141,397
Members
450,355
Latest member
twmills

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