Microsoft KB Archive/34275

= BUG: Change Option in Search Menu May Not Replace All Values =

Article ID: 34275

Article Last Modified on 11/21/2006



This article was previously published under Q34275



SYMPTOMS
There is a problem with the &quot;Replace all occurrences&quot; 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 &quot;Verify before replacing&quot; does not correct this problem with &quot;Replace all occurrences.&quot;

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 &quot;test 1&quot;  Place the insertion point (the flashing vertical bar) anywhere on the PRINT &quot;test 1&quot; line. Select Change... from the Search menu (or press COMMAND-H). Specify to find &quot;1&quot; and replace it with &quot;2&quot;. Activate the &quot;Replace all occurrences&quot; box. Click OK.</li> Only the first &quot;1&quot; on the &quot;DIM x&quot; line will be replaced with &quot;2&quot;. All other occurrences of &quot;1&quot; in the program are successfully changed to &quot;2&quot;.</li></ol>

Additional query words: MQuickB

Keywords: kbbug KB34275

-

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

© Microsoft Corporation. All rights reserved.