PRB: Invalid in Immediate Window Error When Creating Variable (76636)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

This article was previously published under Q76636

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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbprb KB76636