The information in this article applies to:
SUMMARY
Microsoft Excel version 5.0 includes several enhancements to the Microsoft
Excel version 4.0 macro language that enable users to send and retrieve
information from various dialog sheet controls in Microsoft Excel 5.0. The
following information includes examples of tasks that you may want to
perform using this functionality.
MORE INFORMATIONEDIT BOXESTo set the value of an edit box:This examples sets the value of an edit box to "MyValue" and then displays the dialog box. The quotation marks are not necessary for numeric values.
To obtain the value of an edit box:
CHECK BOXESTo obtain the value from three different check boxes:Returns 0 if the check box is not checked, 1 if it is checked, and 2 if it is mixed.
OPTION BUTTONSTo obtain the value of three different option buttons:Returns 0 if the option button is not selected and 1 if it is selected.
LIST BOXESTo obtain the selected value of a list box:This macro will return the #VALUE! error if nothing is selected.
To set the selected item in a list box:
This macro sets the selected value to the third item of the list.
DROP-DOWN LIST BOXESTo obtain the selected value of a drop-down list box:
To set the selected item of a drop-down list box:
This macro will not take effect until the drop-down control is selected at least once. This macro sets the selected value to the third item in the drop-down list.
COMBINATION LIST-EDIT BOXTo obtain the selected value of a combination list-edit box:
To set the selected item of a combination list-edit box:
This macro sets the selected value to the third item of the list.
To obtain the value in the edit box portion of a combination list-edit:
COMBINATION DROP-DOWN EDIT BOXESTo obtain the selected value of a combination drop-down edit box:
To set the selected item of a combination drop-down edit box:
This macro sets the selected value to the third item of the drop-down box.
SCROLL BARSTo return a scroll bar value to an edit box:Assign the control to the following macro by clicking the dialog box control with the right mouse button and choosing Assign Macro from the shortcut menu.
To obtain the scroll bar step increment value:
Assign the control to the following macro by clicking the dialog control with the right mouse button and selecting Assign Macro from the shortcut menu.
SPINNERSTo return the value of a spinner:Assign the control to the following macro by clicking the dialog control with the right mouse button and choosing Assign Macro from the shortcut menu.
Additional query words: Dialogs
Keywords : kbcode kbmacro kbprg PgmOthr |
Last Reviewed: October 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |