Excel: List Box in Custom Dialog Box Appears Empty

Last reviewed: November 29, 1994
Article ID: Q44224
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 1.5, 2.2, 3.0, 4.0
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0
  • Microsoft Excel for OS/2, versions 2.2, 3.0

SUMMARY

If the list box (item 15 or 16) appears empty or blank when a custom dialog box is displayed in Microsoft Excel versions 1.50 and later, there are two possible reasons:

  1. The reference to the list is invalid. The reference to the list must be in the Text column of the dialog box definition table, and it must be in text format (for example, R1C1:R10C1). References to an external sheet that contains apostrophes will cause the problem. (Example: 'My Sheet'!Test, 'sheet1'!R1C1:R10:C1.) A reference to an external sheet that is closed will also cause the problem.

  2. There is no list; that is, the area referred to (by the reference in the Text column) contains no information. Be sure that the reference refers to the correct area of the macro sheet or worksheet.

In Microsoft Excel version 4.0, the references given in item 1 above would need an extra apostrophe due to the leading apostrophe being used to indicate a text item. If only one apostophe (as in 'Test Sheet'!Test) is used it will show no leading apostrophe in that cell and still bring in blanks. This is particularly necessary on the Macintosh platform where files with spaces are common and file references require the apostrophes to work.

References:

"User's Guide 2," version 4.0, pages 276-277 "User's Guide," version 3.0 for the Macintosh, pages 632-633 "User's Guide," version 3.0 for Windows, pages 634-638 "Functions and Macros," version 2.2, pages 177-178


KBCategory: kbusage
KBSubcategory:

Additional words: 1.50 2.00 2.01 2.10 2.20 2.21 3.00 4.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: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.