MOD2000: Unexpected Results Running String Editor a Second Time

ID: Q236505


The information in this article applies to:
  • Microsoft Office 2000 Developer

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 this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

  1. Open any Office Application and press ALT+F11 to open the Visual Basic Editor.


  2. On the Insert menu, click Module.


  3. On the Add-ins menu, click String Editor.


  4. In the String Editor, type the following string:


  5. "a" + "b"
  6. 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.


  7. Leave the selected text as it is, and then on the Add-ins menu click String Editor.


Note that the following text appears in the String Editor:
"a" + "bChr$(34

Additional query words: pra highlight second time

Keywords : kbdta modStringEditor
Version : :
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: November 19, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.