Begin Dialog DialogTest 400,200,250,150,"Test", .displayIt OKButton 192,87,40,15, "OK", .OKButton1 CancelButton 192,109,40,14, "Abbrechen", .CancelButton1 Text 10,10,20,10, "Datei:", .Text1 Text 40,10,150,10, "Text", .txtFilename PushButton 210,10,15,10, "...", .btnFileSelect GroupBox 30,3,170,20, .GroupBox1 CheckBox 35,40,60,15, "Script1", .chkBox1 CheckBox 35,70,60,15, "Script2", .chkBox2 GroupBox 30,30,80,60, .GroupBox2 End Dialog Option Explicit Dim sFilename As String Dim bExitScript As Boolean Sub Main Call Menu() If Not bExitScript Then Else End If End Sub Function Menu Dim Dlg As DialogTest Dim Button As Integer button=Dialog(dlg) If Button = 0 Then bExitScript = True End Function Function DisplayIt(ControlID$, Action%, SuppValue%) 'Controll ID returns the name of the control that received the action, such as the name of the button 'Action give the action that has accured 'SupValue return a suplemental value that further describes a particular action Dim Button As Integer Dim bExitMenu As Boolean Dim chkBoxValue As Integer 'What action is accured? Select Case Action% 'indicates the Dialog has just loaded Case 1 'indicate that an item has been clicked Case 2 Select Case ControlID$ Case "chkBox1" If DlgValue("chkBox1") Then chkBoxValue = 1 Else chkBoxValue = 0 End If Case "chkBox2" If DlgValue("chkBox1") Then chkBoxValue = 1 Else chkBoxValue = 0 End If Case "btnFileSelect" sFilename = selectFile() Case "OKButton1" If sFilename = "" Then MsgBox "Bitte wählen Sie eine Datei aus" Else If DlgValue("chkBox1") = 0 And DlgValue("chkBox2") = 0 Then MsgBox "Bitte wählen Sie eine Betriebsart aus!" Else If DlgValue("chkBox1") = 1 And DlgValue("chkBox2") = 0 Then bExitMenu = True bExitScript = True MsgBox "Script1" 'Client.RunIDEAScript "Makros.ILB\Script1.ISS" Else If DlgValue("chkBox1") = 0 And DlgValue("chkBox2") = 1 Then bExitMenu = True bExitScript = True MsgBox "Script2" 'Client.RunIDEAScript "Makros.ILB\Script2.ISS" Else If DlgValue("chkBox1") = 1 And DlgValue("chkBox2") = 1 Then MsgBox "Bitte wählen Sie nur eine Betriebsart aus!" Else End If End If End If End If End If Case "CancelButton1" bExitMenu = True bExitScript = True End Select 'text has been entered into an edit Box Case 3 'change of Focus Case 4 End Select If bExitMenu Then DisplayIt = 0 Else DisplayIt = 1 End If 'Show Filename when selected If sFilename = "" Then DlgText "txtFilename", "Bitte wählen Sie die Datei Report.IMD aus! -->" Else DlgText "txtFilename", iSplit(sFilename, "", "\", 1, 1) End If End Function Function selectFile() As String Dim Obj As Object Set obj = Client.CommonDialogs selectFile = obj.FileExplorer() Set obj = Nothing End Function