Microsoft KB Archive/65549

= Disappearing SUB Statement When Editing in QB.EXE/QBX.EXE =

Article ID: 65549

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q65549



SYMPTOMS
While programming inside the QB.EXE or QBX.EXE environment, a SUB statement may temporarily disappear when specific steps are performed. These steps involve a combination of deleting the comment line above a SUB...END SUB, moving the cursor with the DOWN ARROW key, and using the TAB key. The steps below demonstrate the problem.



STATUS
Microsoft has confirmed this to be a bug in the QB.EXE environment of Microsoft QuickBasic version 4.50 (buglist4.50) for MS-DOS and in the QBX.EXE environment of Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This particular problem (using the exact steps below) does not occur in earlier versions.



MORE INFORMATION
To reproduce this problem, create a SUB containing the following code: '  SUB DeleteMe PRINT &quot;dummy line&quot; END SUB Do the following on the code above:

 Move the cursor to the first line and delete the comment. Press the DOWN ARROW key to attempt to move the cursor to the next line. The following error message box will pop up:

Blank lines not allowed before SUB/FUNCTION line. Is remark OK?

Press the ENTER key, which will accept the message and delete the blank line. Press the DOWN ARROW key again to move the cursor to the next line. If you are using the QB.EXE program that comes with Microsoft QuickBasic version 4.50, the line that says &quot;SUB DeleteMe&quot; will be deleted. If you are using the QBX.EXE program that comes with Basic PDS version 7.00 or 7.10, continue to Step 5 to reproduce the problem. After using the DOWN ARROW key to move the cursor to any line of code in the SUB, press the TAB key and that line will be replaced with the line &quot;SUB DeleteMe&quot;. If you press the DOWN ARROW key again, the original line will reappear.</li></ol>

NOTE: If the text is not returned, you may be able to recover the text in Basic PDS versions 7.00 and 7.10 by choosing the Undo command from the Edit menu to reverse the previous edit. The Undo command reverses up to 20 previous edits.

Additional query words: QuickBas BasicCom buglist7.00 buglist7.10

Keywords: KB65549

-

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

© Microsoft Corporation. All rights reserved.