Link to home
Start Free TrialLog in
Avatar of Mohammad Alsolaiman
Mohammad AlsolaimanFlag for Saudi Arabia

asked on

save Excel Macro-Enabled Workbook as Excel Workbook, using VBA.

Hello;
How to save Excel Macro-Enabled Workbook as Excel Workbook, using VBA.
help me please
Avatar of byundt
byundt
Flag of United States of America image

It is not clear which workbook is being saved: the active workbook, the one with the macro that is running, some other workbook.

Neither is it clear whether you want to save the workbook as .xls, .xlsx, .xlsm, or .xlsb file format.

Nor is it clear whether the code needs to run only on Windows Excel, or perhaps also on Mac Excel.

I suggest starting by reading Microsoft Excel MVP Ron de Bruin's webpage on the subject. In general, the SaveAs statement must include both Path & filename and the file format parameter. Omitting the file format parameter will lead to a runtime error when you later try to open the file. If it still isn't clear how to do what you want after reading that webpage, please post the specifics in a Comment.
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mohammad Alsolaiman

ASKER

I have   Excel Macro-Enabled Workbook  which extension is (xlsm),  and I need to have a VBA code can save it as plain Excel Workbook which extension is (xlsx). only on Windows Excel.
Awesome
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial