Hi, and sorry for the long question..
My issue is that I need a number of applications to work in Windows XP (Office 2003, and an internal program), and also be able to work in Windows 7 (Office 2010, and an updated internal program). - I need each application (Excel/Access Macro) as a single file, and I need each file to work, regardless of what OS/office/application version the user has.
I already implemented code to add/remove the appropriote references (based on GUID), as well as code to determine the Office version (If a user has Office 2010, they also have Windows 7 and the updated program, while if a user has Office 2003, they have XP and the old program).
--
The issue I have right now is: I have two modules - One module that works in Windows XP with the old program, and one module that works in Windows 7 with the new program.
If I add them both to the macro, I get compile errors and am unable to even run the macro (my initial goal was to basically do an 'if WinXP then use old module, if Win7 then use new module).
I know the best solution to this is to use a seperate workbook and read from there - this is not possible with the way our security is set up.
The solution needs to be within one Excel workbook.
--
So - basically, is there a way to somehow ignore these compile errors? or to (with code) comment out or delete a module (perhaps on workbook open?) Maybe there's an even simpler solution..
Is there some way I can combine both modules into a class module, and only use the parts I require based on Office version?
Bookmarks