Avatar of Mohammad Alsolaiman
Mohammad Alsolaiman
Flag 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
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
byundt

8/22/2022 - Mon
byundt

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
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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.
Mohammad Alsolaiman

ASKER
excelSheet
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Mohammad Alsolaiman

ASKER
Awesome
SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.