XL5: Extra Ampersand Appears in Combination Drop-Down Edit Box

Last reviewed: September 12, 1996
Article ID: Q110870
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel version 5.0, if the first cell in a range is linked to a combination drop-down edit box, and if that cell contains an ampersand, two ampersands will appear in the edit box when the dialog box is displayed. When you select the drop-down arrow to display the list and then select an item from the list, the extra ampersand disappears.

STATUS

Microsoft has confirmed this to be a problem in version 5.0 of Microsoft Excel for Windows. We are researching this problem and will post new information here as it becomes available.

MORE INFORMATION

List boxes and combination edit boxes present a list of choices. With a combination drop-down edit box, you can enter text directly in the edit box, or select the arrow at the right of the edit box to select an item from a list.

To display a list in the list box, you can use the Object command on the Format menu to link the box to a range of cells on a worksheet. If the first cell of that linked range contains an ampersand, such as in the name AAA Appliance & TV, the edit box will display the following when the dialog is called:

   AAA Appliance && TV

The drop-down list does not display the extra ampersand.

Steps to Reproduce Problem

  1. In new workbook, enter the following on Sheet1:

         A1:  AAA Appliance & TV
         A2:  Ace Hardware
         A3:  Acme Lumber Co.
         A4:  Bob's Diner
    

  2. From the Insert menu, choose Macro, and then choose Dialog.

  3. to add a combination drop-down edit box to the dialog box, choose the Combination Drop-Down Edit Box button from the Forms toolbar.

  4. Select the box and choose Object from the Format menu. Select the Control tab and enter the following reference in the Input Range box:

          SHEET1!$A$1:$A$4.
    

    Choose OK to accept the change.

  5. To activate the dialog box, choose the Run Dialog button on the Forms toolbar.

  6. Select the list to display it and choose AAA Appliance & TV.

Note that the text box of the combo box contains an additional ampersand in the name AAA Appliance & TV item. If the two ampersands don't appear the first time you run the dialog box, choose the run dialog button again.

REFERENCES

"Visual Basic User s Guide," version 5.0, pages 219-239


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.