FIX: UAE/GPF When Square Brackets '[]' Around MSGBOX Function
ID: Q93425
|
The information in this article applies to:
-
Microsoft Visual Basic Standard Edition for Windows, version 2.0
SYMPTOMS
If you enclose an identifier which has a total length of 40 or more
characters in square brackets ("[]"), an Unrecoverable Application Error
(UAE) or General Protection (GP) fault occurs.
STATUS
Microsoft has confirmed this to be a problem in the Standard Edition of
Microsoft Visual Basic for Windows, version 2.0. This problem was corrected
in Microsoft Visual Basic version 3.0 for Windows.
Square brackets are used when you have an identifier with the same name as
a reserved word, and you need to specify that this occurrence of the word
is an identifier, and not a use of a reserved word). Identifiers in Visual
Basic for Windows, version 2.0 are limited to 40 characters in length.
MORE INFORMATION
The following steps can be used to reproduce this problem:
- Start VB.EXE.
- Select the New Module routine from the File menu to add Module1.BAS.
- Add the following to the general declarations section of Module1.BAS:
' The following statement should appear on one line.
[BUTTON = MSGBOX("SOME OR ALL OF THE DATES ARE OUT OF RANGE OR
WERE NOT PROPERLY FORMATTED AND HAVE BEEN RESET TO TODAY'S DATE.
THE VALID RANGE FOR DATES IS " + RANGE + " AND SHOULD BE IN THE
FORMA]
- Note the above section of text is on four lines. Place the cursor at the
end of the first line and press the Delete key, this appends the second
line to the end of the first line. Press the End key to place the cursor
at the end of the new first line, and then press the Delete key again,
this should append the third line to end of the first line. Proceed on
by pressing the End key one more time to place the cursor at the end of
the first line. Then press the Delete key again, and this should append
the fourth and last line to the first line.
- With the cursor at the end of new long first line, press the Enter
or Return key. A UAE or GPF occurs.
Note: If you try the example above in an event procedure of a procedure
defined by the user, the same problem occurs.
Additional query words:
buglist2.00 fixlist3.00 2.00 3.00
Keywords :
Version : WINDOWS:2.0
Platform : WINDOWS
Issue type :