Insufficient Immediate window memory to create variable

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

Memory in the Immediate window is limited. This error has the following cause and solution:

  • You specified a variable in the Immediate window that must be instantiated, since it wasn't created in the program's code context.

    Delete the reference to the variable in the Immediate window, or declare the variable in the program's code context so that it doesn't have to be created in the Immediate window.

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