12-10-2018 03:08 PM
I'm trying to close all open non-modal dialog boxes before recreating a new one. (Just in case one gets left open)
However, it seems that SudNonModalDlgCount does not contain the correct count of non modal dialog boxes. If I run the code below, I get an error at the "IsValid" call. The error is: "Object required: 'SudNonModalDlgLst(...)' " How can I ensure that all open non-modal dialog boxes are closed, and not simply hidden?
For i = 1 to SudNonModalDlgCount If SudNonModalDlgLst(i).IsValid then Call SudNonModalDlgLst(i).Cancel end if next
12-11-2018 01:46 AM
Hi RussellSenior
You first count the dialog boxes and then close them. Then it is clear that the number of open dialog boxes is reduced by 1. So you have to run the loop in the revers order.
For i = SudNonModalDlgCount to 1 Step -1
Hope this helps.
Winfried