Module too large

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

A module contains code within the project. This error has the following cause and solution:

  • There is too much code in the module.

    Create a new module and move some of the procedures from this module to the new one. If the current module contains module-level declarations of data that must be visible to the procedures in the new module, declare that data as Public.

    Note

    Comments aren't counted as lines of code. Therefore, deleting comments doesn't prevent this error.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).