Getting a Return Value

Visual LANSA

Getting a Return Value

The Show method of the Dialog object has two parameters: TimeOut and return value (Show_RETVAL):

The return value parameter indicates whether the OK (1) or the Cancel (0) button was clicked. This code shows a message if the OK button was clicked on the SaveAs dialog box:

invoke method(#WordApp.Dialogs.item<VA_WORD.wdDialogFileSaveAs>.show) SHOW_Retval(#std_num);

if cond('#std_num *ne 0');

execute infmessage 'Document has been saved.';

endif;

 

Ý 7.2.4 Example of Integrating Microsoft Word