Microsoft KB Archive/236505

= MOD2000: Unexpected Results Running String Editor a Second Time =

Article ID: 236505

Article Last Modified on 7/31/2001

-

APPLIES TO


 * Microsoft Office 2000 Developer Edition

-



This article was previously published under Q236505



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
If you run the String Editor a second time on a string that originally contained quotation marks, the String Editor may return unexpected results.



CAUSE
When you type a string that contains quotation marks, the String Editor evaluates the string properly. However, all of the text in the resulting string is highlighted, except for the last character. If you then leave the resulting string highlighted as it is, and run the String Editor a second time, the resulting string is missing the last character, and is therefore invalid. When the Visual Basic Editor tries to parse a string that is invalid, you receive unexpected results.



RESOLUTION
If you want to run the String Editor a second time on an existing string, make sure the entire string is highlighted.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
 Open any Office Application and press ALT+F11 to open the Visual Basic Editor. On the Insert menu, click Module. On the Add-ins menu, click String Editor. In the String Editor, type the following string:

"a" + "b"

 Click Update.

Note that the following string appears in the module:

Chr$ (34) & "a" & Chr$(34) & " + " & Chr$(34) & "b" & Chr$(34)

Note that all of the text in the string is highlighted, except for the last parenthesis.</li> Leave the selected text as it is, and then on the Add-ins menu click String Editor.</li></ol>

Note that the following text appears in the String Editor:

"a" + "bChr$(34

Additional query words: pra highlight second time

Keywords: kbbug kbpending kbstringeditor KB236505

-

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

© Microsoft Corporation. All rights reserved.