Problem w/ file save macro fileformat:=52

Audiology

Board Regular
Joined
Mar 4, 2009
Messages
171
I have a file-name-save macro that appends concatenated, record-specific data located in cell H60 to the file name


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

This works fine in XP/Excel 2003, XP/Excel 2010, Windows 7/Excel 2010.

I am able to successfully change the target file on an XP/Excel 2010 computer as follows:

Public Sub SAVE_WORKBOOK()
ThisFile = Range("SDC!H60").Value
ActiveWorkbook.SaveAs filename:="C:\POSE DATA 2011\" & ThisFile & ".xlsm", FileFormat:=52
End Sub

Applying the exact same macro to a Windows 7/Excel 2010 computer, I get the following error message:

"Microsoft Excel cannot access the file : 'C:\POSE DATA 2011\5DEDC330' ."

It seems as if the fileformat:=52 switch is not recognized.

Was gibt??
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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