WD: Multiple Selections from a WordBasic Dialog ListBoxLast reviewed: February 2, 1998Article ID: Q60872 |
The information in this article applies to:
SYMPTOMSCustom dialogs boxes created in the Microsoft Word macro language, WordBasic, do not allow multiple selections from a combo box or list box. Only a single item can be selected from a dialog list box or combo box.
CAUSEIn order to allow for multiple selections, you can use a group of check boxes. Check boxes are independent in that you can choose any number of check boxes within a dialog.
RESOLUTION
Word 6.x, 7.xIf you're using Word 6.0, you can create a dynamic dialog box with two side-by-side list boxes and a button that copies the selected item from the left list box to the right list box. The BatchConversion macro in the CONVERT.DOT file includes an example of this technique (CONVERT.DOT is located in the \WinWord\Macros directory).
Word 2.xThe following Word for Windows 2.0 macro uses eight independent CheckBox statements to allow for multiple selections.
Sub MAIN Begin Dialog UserDialog 400, 196, "Microsoft Word" OKButton 282, 130, 88, 21 CancelButton 282, 158, 88, 21 GroupBox 10, 16, 344, 108, "Group Box" CheckBox 28, 33, 111, 16, "Check 1", .CheckBox1 CheckBox 28, 52, 111, 16, "Check 2", .CheckBox2 CheckBox 28, 69, 111, 16, "Check 3", .CheckBox3 CheckBox 28, 86, 111, 16, "Check 4", .CheckBox4 CheckBox 182, 33, 111, 16, "Check 5", .CheckBox5 CheckBox 182, 52, 111, 16, "Check 6", .CheckBox6 CheckBox 182, 69, 111, 16, "Check 7", .CheckBox7 CheckBox 182, 86, 111, 16, "Check 8", .CheckBox8 End Dialog Dim dlg As UserDialog n = Dialog(dlg) End Sub |
Additional query words: list box combo dialog
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |