SaveCopyAs AND change file format.

GS7CLW

Banned
Joined
Aug 10, 2010
Messages
168
I have numerous occasions to save a copy of a workbook in a different file format (xlsX) and keep the main wb open (xlsM) using a macro.

ie
I have C:\FloorReport.xlsM open and finished posting data.
Next, I want to save it as C:\FloorReport.xlsX while leaving
C:\FloorReport.xlsM open.

If I use SaveAs it simply saves the open wb to the desired new format (xlsX) and closes C:\FloorReport.xlsM

If I use SaveCopyAs, it will NOT save it in the NEW format.

ANY help would be appreciated.

Hope everyone had a great New Years dat!!
cliff
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
This is a work-around to SaveCopyAs without macros

Code:
[color=darkblue]Sub[/color] SaveCopyAs_Without_Macros()

    ActiveWorkbook.Sheets.Copy [color=green]'creates new workbook without macros"[/color]
    [color=green]'The New workbook copy is now the Active workbook[/color]
    ActiveWorkbook.SaveAs Filename:="C:\FloorReport.xlsx", FileFormat:=51
    ActiveWorkbook.Close
    
[color=darkblue]End[/color] [color=darkblue]Sub[/color]
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

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