The information in this article applies to:
SUMMARYThe following Microsoft WordBasic macro provides an example of how to evaluate which button was pressed in a user-defined dialog box. The macro uses a Select Case structure to evaluate the value returned by the dialog function; N = Dialog(DialogRecord). MORE INFORMATIONSpecific values are assigned to the buttons in a dialog box. The function N=Dialog(DialogRecord) stores the value assigned to the button in the dialog box for later use. (DialogRecord) is the name that the user gives to the dialog box. The values of "N" are as follows:
The values for the pushbuttons are chronologically assigned, meaning
the first pushbutton is assigned one, the second two, and so on. The OK
button always has the value minus one (-1) and the Cancel button
always has the value zero (0).
The following macro demonstrates how the evaluation works. Inside the case statements various types of tasks can be performed. This example uses message boxes for simplicity.
For more information, search for "WordBasic Programming Language" and
"Dialog" using the Help menu.
Additional query words: pushbutton dialog winword2 word6 6.0.1 word7 winword 7.0 word95 push button 2.0 macword
Keywords : kbmacro |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |