当前位置: 动力学知识库 > 问答 > 编程问答 >

outlook - Error: procedure too long vba: only on one pc out of 11

问题描述:

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?

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: