-
Zipped Workbook Attached
To enter VBE - Lucille.
I used the macro recorder in the 2007 VBE to come up with the code to save the file in the .xlsm format, then imported that into the macro that used an if-then statement to evaluate for Excel version.
If version < 12 then ... use the 2003 code
If version = 12 then ... use the 2007 code
Worked great in 2007, but when I tried it out in 2003, I would get both a runtime error and a compile error of Variable Not Declared referring to the xlOpenXMLWorkbookMacroEnabled needed by 2007. I preface each module with Option Explicit. I tried to Dim the expression xlOpenXMLWorkbookMacroEnabled as a variant just for grins. That made it work in 2003, but not 2007.
That's where you came to the rescue again. Removing the save routines to another module, then calling them from there still causes a compile error, but not a runtime error.
Ron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules