Share via

compile error procedure too large

Anonymous
2011-10-18T11:50:49+00:00

I'm opening an Excel sheet made in Microsoft Windows. It's a calculation sheet with lots of macro's.

It works perfect in Microsoft Windows.

However I'm working with a MacBook pro and Microsoft Office 2011 (with latest patches) and need to open this calculation sheet.

But I'm getting a "compile error procedure too large" error message with Excel 2011 for the Mac.

I just hate this kind of stuff that Microsoft is not even compatible with its own products.

Is there any way I can use this calculation sheet?

regards

Andre Seesink.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2013-09-27T20:35:32+00:00

I agree with Jim that unless the code is posted, any responses are speculation.

However, if I may speculate:

I've seen this once or twice with heavily edited code. WinXL/VBA is better at dealing with code corruption than MacXL/VBA is. So it might be worth it to try cleaning up the internal code modules.

If you have access to 32-bit WinXL, run Rob Bovey's Code Cleaner.

Otherwise, if you can open the file on either platform:

In the Visual Basic Editor:

  • For each regular or custom class code module, copy the text and paste as plain text to a text editor (using one or more text files)
  • If the code is in a regular code or custom class module, note the name of the module in your text file, then delete the module
  • If the code is in a built-in class module (e.g., ThisWorkbook, Sheet1. etc.), select all of the code and delete it
  • Save the XL file as a new file and close XL (the latter is probably not necessary, but it won't hurt).
  • Open the new file (after renaming, if desired)
  • Copy the code from built-in class modules in the text editor to the new workbook's built-in class modules.
  • Recreate each regular or custom class module, rename it appropriately, and copy the corresponding code from the text editor file to the new module.
  • Save the XL file.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Jim G 134K Reputation points MVP Volunteer Moderator
    2013-09-27T19:07:10+00:00

    Unless one of the people who experiences the "procedure too long" error posts the code that is generating this error, no one will be able to answer.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-09-23T18:27:40+00:00

    Hi Andre,

    Did you find any possible workaround ?

    I also have the similar kind of issue. I have a word template generated by me which works perfectly fine on word 2010, but when I am trying to use the same template on Mac (word 2011) it show me error like, "compile error: Procedure too long"

    please let me know the solution ?

    I wonder that vba for the mac and windows is different or what ?

    Regards,

    Hardik

    Was this answer helpful?

    0 comments No comments
  3. Jim G 134K Reputation points MVP Volunteer Moderator
    2011-10-19T04:41:35+00:00

    The version of VBA in Excel 2011 is the same as Excel 2010 for Windows, so compiling should work the same.

    More details are needed to help you solve this problem. Exactly what is the procedure that causes the error message?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-10-19T01:29:56+00:00

    Thank you for Posting in Office for Mac forums.

    Can you save these spreadsheets in compatibility mode within Windows and then attempt to transfer to Excel for Mac?

    You may also refer to the following Microsoft article for more help:

    http://support.microsoft.com/kb/983044

    Was this answer helpful?

    0 comments No comments