Link to home
Start Free TrialLog in
Avatar of Calyx Teren
Calyx TerenFlag for United States of America

asked on

How to get a macro to loop through a folder to remove buttons from .xlsm spreadsheets and save them as .xlsx?

I have a macro that loops through a folder and removes buttons then saves the workbook as a .xslx file, but I get this error:

Run-time error '1004':
You cannot save this workbook with the same name as another open workbook or add-in. Choose a different name, or close the other workbook or add-in before saving.
test-macro-for-button-deletion.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark 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 Calyx Teren

ASKER

Thank you, Ejgil, for the macro and for the detailed explanation as to how it works. The macro worked perfectly.