PRB: Invalid in Immediate Window Error When Creating Variable

Last reviewed: June 21, 1995
Article ID: Q76636
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0

SYMPTOMS

One of the following error messages may occur when you attempt to create a new variable in the VB.EXE Immediate window:

   Invalid in Immediate Window

      -or-

   Invalid in Debug Window

CAUSE

This error message may occur if your program has encountered a serious error (for example, "Out of Stack Space") from which the program cannot continue. The current program must be able to continue for variables to be created in the Immediate window.

RESOLUTION

Exit Visual Basic.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Visual Basic, or choose New Project from the File menu if Visual Basic is already running.

  2. Double-click Form1 to open a code window. In the Form_Click event procedure, enter the following code:

    Call Form_Click

  3. Execute the program and click Form1. An "Out of Stack Space" error is displayed.

  4. Close the error message window and enter the following code in the Immediate window:

    A$ = "123"

  5. At this point, you will receive one of the error messages listed above. If not, repeat steps 3 and 4.


Additional reference words: 1.00 2.00 3.00
KBCategory: kbenv kbprg kbprb
KBSubcategory: EnvtDes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.