Excel 2007 VBA macros don't work in Parallels

Posted by MindModel on Super User See other posts from Super User or by MindModel
Published on 2010-08-11T14:57:24Z Indexed on 2012/09/21 3:41 UTC
Read the original article Hit count: 363

Filed under:

I've got a complex Excel spreadsheet I need to use at work. My colleagues use the spreadsheet on Windows PC's, with no special configuration required. I want to run it on a MacBook Pro running Snow Leopard. The spreadsheet contains VBA macros which connect to external Oracle db's over the Internet.

If I understand correctly, Excel on the Mac doesn't run VBA macros, so I have to use Parallels. I installed Parallels on the Mac and it's running correctly, as far as I can tell. I installed Excel 2007 under Parallels.

I can open the Excel spreadsheet in Parallels and click buttons in the spreadsheet to run macros, but the macros fail with compiler errors. I don't have the password to the source code for the VBA macros, and if possible, I don't want to dig in to the code at that level.

I know that there are quite a few things that could go wrong, and examining the VBA code might help, but I'm hoping to solve the problem without going down that road. The spreadsheet runs without any special configuration on Windows, so I'm wondering if anyone out there knows of any limitations of Excel VBA macros under Parallels, or anything else I could do to get this spreadsheet working.

It's the only thing that's keeping me from using this MacBook Pro at work.

Here is the error message:

Compile error in hidden module: clsXXXXx0020Toolx0020Ser. This error commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click Help for more info.

Compile error in hidden module:

A protected module contains a compilation error. Because the error is in a protected module it cannot be displayed.

This error commonly occurs when code is incompatible with the version or architecture of this application (for example, code in a document targets 32-bit Microsoft Office applications but it is attempting to run on 64-bit Office).

This error has the following cause and solution:

Cause of the error:

The error is raised when a compilation error exists in the VBA code inside a protected (hidden) module. The specific compilation error is not exposed because the module is protected.

Possible solutions:

If you have access to the VBA code in the document or project, unprotect the module, and then run the code again to view the specific error.

If you do not have access to the VBA code in the document, then contact the document author to have the code in the hidden module updated.

© Super User or respective owner

Related posts about microsoft-excel

Related posts about macros