Excel vba xlsm to xlsx format 51, not removing macros
Excel vba xlsm to xlsx format 51, not removing macros
(OP)
Hi Guys,
I am working on a project where the user fills in some data on an excel document, clicks a button and it should generate a report which is practically a copy of the ActiveWorkbook. The issue I am facing is when I use ActiveWorkbook.SaveAs filename.xlsx,51 it’s not actually creating a version of the workbook without the Macros. It instead opens up the copy as xlsx with Macros still intact. I tried using ActiveWorkbook.SaveCopyAs filename.xlsx and that gives me the unable to open file due to incorrect extension.
Everything online seems to state that SaveAs method should work. Am I missing a trick here, I feel like it shouldn’t be this hard. Using office 2016 if that helps. There are too many sheets to copy them one by one in to a new workbook.
Any help is appreciated.
J.
I am working on a project where the user fills in some data on an excel document, clicks a button and it should generate a report which is practically a copy of the ActiveWorkbook. The issue I am facing is when I use ActiveWorkbook.SaveAs filename.xlsx,51 it’s not actually creating a version of the workbook without the Macros. It instead opens up the copy as xlsx with Macros still intact. I tried using ActiveWorkbook.SaveCopyAs filename.xlsx and that gives me the unable to open file due to incorrect extension.
Everything online seems to state that SaveAs method should work. Am I missing a trick here, I feel like it shouldn’t be this hard. Using office 2016 if that helps. There are too many sheets to copy them one by one in to a new workbook.
Any help is appreciated.
J.
Regards
J.
RE: Excel vba xlsm to xlsx format 51, not removing macros
Is it the same in your case?
combo
RE: Excel vba xlsm to xlsx format 51, not removing macros
Are you sure?
<edit>Oops ... mea culpa. Of course you are trying to eliminate macros, not retain them. Oops.</edit>
RE: Excel vba xlsm to xlsx format 51, not removing macros
that uses:
CODE --> vba
When i generate using
CODE --> vba
Sorry for wasting time.
Thanks for getting back to me though
Regards
J.