-1

I have a relatively long macro. It runs on all but one PC, which produces the following error: procedure too long, or something like this.

All PCs have Office 2010, 3 have Win 7 32bit, 8 have Win 7 64bit. The problematic PC runs a 32bit version of Win 7.

The other two 32bit PCs run the code, so I figured it may not be the problem.

Do you know any solution to this?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
ZZA
  • 129
  • 1
  • 11

1 Answers1

2

I'm not sure how you're not getting the error on all 32-bit machines, but presumably you're hitting this:

"Compile Error: Procedure too large" error message when you try to run a VBA macro in a 32-bit version of an Office 2010 program

http://support.microsoft.com/kb/983044/en-us

First off, you'd want to reduce the size of your procedures. You could break large procedures up into several small subroutines, and call them one after the other; there are some good tips in this answer.

Second, try doing the editing on a 32-bit machine, and that should help keep it under the 64KB compiled limit.

Community
  • 1
  • 1
Geoff
  • 8,551
  • 1
  • 43
  • 50
  • I will try to shorthen my procedure's length, I have looked up this error, before I've posted this question, my questions were related to why would it work on one 32 bit system and not on the other. – ZZA Apr 11 '14 at 10:44