ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Different versions Excel errors (https://www.excelbanter.com/excel-programming/302156-different-versions-excel-errors.html)

heather

Different versions Excel errors
 
A person in my group has created a macro in Excel 2002 and
I am still in Excel 2000. The macro will not run
correctly on my version. Can anyone give me a hint why? I
looked at the code I just can't see the problem. All he
did was a record macro.

Thanks

Tom Ogilvy

Different versions Excel errors
 
many command have added options which were not suppored in previous versions
of excel. If you record in the lastest version, it records all options,
including the lasted ones. When you take the code back to xl2000, it
doesn't understand the option and raises an error. The solution is to
remove these option settings from the code. You can do this by debugging
the macro in xl2000 - when it highlights a line, check the options in help
that xl2000 recognizes and remove the ones it does not.

As a matter of practice, you should record your macros/do your development
in the lowest version that will use the code.

Another problem you could have is that Excel does not recognize later
versions of libraries that are referenced by the workbook. You can run
macro until it crashes, then go into the VBE and go to Tools=References and
see if any reference(s) is(are) marked as MISSING. This would indicate that
excel does not recognize them and they should be unchecked if not used or
the appropriate equivalent found and referenced.

--
Regards,
Tom Ogilvy

"Heather" wrote in message
...
A person in my group has created a macro in Excel 2002 and
I am still in Excel 2000. The macro will not run
correctly on my version. Can anyone give me a hint why? I
looked at the code I just can't see the problem. All he
did was a record macro.

Thanks





All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com