I've created a button with the following script , it'll show a new dialog each time when I click the button,
how do I get only one instance of the dialog even I click the button many times?
Function OnClick(ByRef clickData)
DOpus.ClearOutput
Dim Dlg
Set Dlg = DOpus.Dlg
Dlg.Window = clickData.func.sourcetab
Dlg.template = "MainDialog"
Dlg.detach = True
Dlg.want_close = True
Dlg.Show
End Function