Excel 2010 incompatible code error

Nuz

Board Regular
Joined
Aug 16, 2010
Messages
88
My client upgraded to Excel 2010 and now gets the following error when trying to run one macro within the workbook: "Compile error in hidden module: XXXXX. The error commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click "Help" for information on how to correct this error."

To my eyes, there seems to be not any unusual macro code which can cause the problem (unfortunately I can't right now access the specific row on which the error occurs). There is one pivot table in a hidden sheet which the macro updates among some other small things.
And the weird thing is that on my Excel 2010, I don't get the error at all. The only difference I know is that I have 64-bit Windows and my client has 32-bit. The original Excel file is developed with Excel 2002.

What might cause that error message?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Nuz,

At a guess I'd say there's an error with a reference as its location has changed between versions in the Visual Basic Editor (VBE).

To check and remove if there is, follow these four steps:

1. Open the VBE (Alt + F11)
2. From the Tools menu click References
3. Uncheck (untick) any reference from the Available References listbox on the References - VBA Project dialog that start with "MISSING" and then click OK
4. From the File menu click Close and Return to Microsoft Excel

Try and re-run the macro which (hopefully) now executes hassle free.

HTH

Robert
 
Upvote 0
That might very well be the case.
In my Excel, the references have updated to version 14.0 automatically and there is not any with "missing" status. I have both Excel 2002 and 2010 installed but I suppose my client has only 2010.
I can also see a reference to Microsoft Calendar Control 10.0 and Microsoft Word 10.0 Object Library.
Can the problem be with these?
 
Upvote 0
I wouldn't say so (can't say so for sure though) as the erroneous references have "MISSING" as part of their name when their link can no longer be found. Typically the "Ref Edit" reference (an add-in that allows ranges to be selected via a userform) is the culprit.

I'd suggest checking the references on your client's machine.
 
Upvote 0
Thanks for the replies.
Of course many such problems could be solved by going to the client's computer and opening the model and VBA code there but I try to avoid going to my client's computer if possible and instead prefer to make an updated version of the Excel file which is working.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,855
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top