Microsoft KB Archive/89043

= ALT Key Required to Access VB for MS-DOS MsgBox Buttons =

PSS ID Number: 89043

Article Last Modified on 1/8/2003

-

The information in this article applies to:


 * Microsoft Visual Basic for MS-DOS 1.0

-



This article was previously published under Q89043



SUMMARY
The dialog box invoked by the MsgBox function in Microsoft Visual Basic version 1.0 for MS-DOS functions differently then that invoked by the MsgBox function in Microsoft Visual Basic version 1.0 for Windows.

When you use a MsgBox function in Microsoft Visual Basic for Windows with the Yes and No buttons (that is, type 3 or 4), you can select the Yes or No button by simply pressing Y or N. In Microsoft Visual Basic for MS-DOS, you are not able to select the Yes or No button by pressing Y or N. In Microsoft Visual Basic for MS-DOS, you need to use the key combination ALT+Y or ALT+N to select the Yes or No button.



Steps to Reproduce Behavior
 Start Visual Basic for MS-DOS with a New Project selected from the File menu.  In the Code window, add the following code: msg% = MSGBOX(&quot;This is a test&quot;, 3)  Run the program. You should see the Msgbox window with the text &quot;This is a test&quot; and three buttons with the text &quot;Yes,&quot; &quot;No,&quot; and &quot;Cancel&quot; displayed. Press Y or N; the MsgBox window will not go away.

To get the MsgBox window to disappear, press ALT+N or ALT+Y.

Additional query words: VBmsdos 1.00

Keywords: KB89043

Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.