DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if Sud Dlg1 already exists?

Solved!
Go to solution

Hi, I have some code in a script that creates a Sud Dialog (SudDlgCreate("Dlg1",...). However, when I want to run the script again it complains that:

"A dialog box called "DLG1" already exist." 

Is there any way to check if the Dlg1 already exists? Like this:

 

If Dlg1 = 0 Then

Set MyDlg = SudDlgCreate("Dlg1","C:\Temp\QuickTools.sud")

 

Thanks in advance

/Mike

0 Kudos
Message 1 of 3
(1,363 Views)
Solution
Accepted by topic author Mike_77

Worth trying

 

Dim i
For i = 1 to SudNonModalDlgCount
  if SudNonModalDlgLst(i).DialogCode = "Dlg1" Then
    Call MsgBoxDisp(SudNonModalDlgLst(i).DialogCode & " Exists")
  end if
Next
Message 2 of 3
(1,342 Views)

Thank you, it works perfect!

0 Kudos
Message 3 of 3
(1,324 Views)