Article ID: 34275
Article Last Modified on 11/21/2006
This article was previously published under Q34275
SYMPTOMS
There is a problem with the "Replace all occurrences" feature of the Change... option in the Search menu. When there are multiple occurrences of the item being searched for on the same line, and the insertion point is on the next line when the search is initiated, only the first occurrence of the item on the previous line is replaced. All other replacements are done properly.
Selecting "Verify before replacing" does not correct this problem with "Replace all occurrences."
Microsoft has confirmed this to be a bug in the Microsoft QuickBasic Compiler Version 1.00. We are researching this problem and will post new information as it becomes available.
To work around this problem, place the insertion point anywhere except right after a line with multiple occurrences of the search text.
MORE INFORMATION
The following steps demonstrate the problem:
Run QuickBasic and type the following program into the Listing window:
DIM y(1,1,1,1,1,1) DIM x(1,1,1,1,1,1) PRINT "test 1"
- Place the insertion point (the flashing vertical bar) anywhere on the PRINT "test 1" line.
- Select Change... from the Search menu (or press COMMAND-H).
- Specify to find "1" and replace it with "2".
- Activate the "Replace all occurrences" box.
- Click OK.
- Only the first "1" on the "DIM x" line will be replaced with "2". All other occurrences of "1" in the program are successfully changed to "2".
Additional query words: MQuickB
Keywords: kbbug KB34275