VBA Procedure too Large

Written by

Mel Jenkins

Reviewed by

Steve Rynearson

Last updated on May 2, 2022

This article will explain the VBA procedure too large error.

vba procedure too large

There are 2 main reasons that this error can appear in Excel VBA.

Check Excel Version

This error can occur if you are running a 32-bit version of Excel, but you have a very large procedure which would be better off being run in a 64-bit environment.

Just because your PC is 64-bit does not necessarily mean that your version of the Microsoft Office is 64-bit, so you will need to check your Excel version.

In the Ribbon, select File, then (1) select Account and then (2) About Excel.

vba procedure account

 

Check in the information that appears about Excel – it will let you know if you are running the 32-bit or 64-bit version of Office.

vba procedure excel version

If you need to upgrade to the 64-bit version, make sure that it will not effect any add-ins or other macros that you use. Most add-ins and macros need to be customized to run on the 64-bit version of office and older add-ins may not run at all.

Decrease the Size of Your Procedure

The other main reason is that your Procedure is, simply, too large! You need to try and decrease the size of your procedure by using Loops or Nested Procedures instead of having the code all in a single procedure.

You can for example break down your code into separate procedures and then call the separate procedures in your main procedure.

For example:

 

vba procedure call procedures

 

vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples