Microsoft KB Archive/89173

{|
 * width="100%"|

Excel: Custom Dialog Box Limits

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0
 * Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.0, 4.0
 * Microsoft Excel for OS/2, versions 2.2, 3.0

-

SUMMARY
In Microsoft Excel, attempting to display a custom dialog box that has more items than the specified limits, results in the error message:

Error in dialog box at (versions 3.0 and 4.0)

"-OR-"

Illegal dialog value (versions 1.x and 2.x)

The limits on items in custom dialog boxes in Microsoft Excel are:

Version 4.0

 * 64 total items
 * 32 items that can accept or return values.
 * 8 list boxes
 * 1024 text characters

Version 3.0 and earlier

 * 64 total items
 * 32 items that can accept or return values
 * 4 list boxes
 * 1024 text characters

MORE INFORMATION
Items that can take or return arguments are items that either read some value from the initial/result column of the dialog definition table, write some value to the initial/result column, or both.

Combination and Linked list boxes accept and return values through their linked text edit boxes. Most of these list boxes also accept and return a list index value in the initial/result column. Therefore you would count the list box and the text edit box associated with it as separate items. The exception to this is the Linked drive and directory list box, and the Directory text box (items 19 & 20 Windows only). These boxes ignore the initial/result column.

The following items can take or return arguments:

Item Number   Item 6        Text edit box 7        Integer edit box 8        Number edit box 9        Formula edit box 10       Reference edit box 11       Options button group 13       Check box 15       List box 16       Linked list box 18       Linked file list box (Windows only) 21       Drop-down list box 22       Drop-down combination edit/list box