Here is the code i have
--------------------------
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions
If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
Begin Dialog cbdlg 99, 130, 185, 396, "test"
ButtonGroup .bg
OkButton 131, 74, 50, 14
CancelButton 132, 109, 50, 14
CheckBox 0, 0, 40, 10, "LINE1", .CheckBox1
CheckBox 0, 18, 40, 10, "LINE2", .CheckBox2
CheckBox 0, 39, 40, 10, "LINE3", .CheckBox3
CheckBox 0, 59, 40, 10, "LINE4", .CheckBox4
CheckBox 1, 77, 40, 10, "LINE5", .CheckBox5
CheckBox 0, 99, 40, 10, "LINE6", .CheckBox6
CheckBox 0, 121, 40, 10, "LINE7", .CheckBox7
CheckBox 0, 141, 40, 10, "LINE8", .CheckBox8
CheckBox 0, 161, 40, 10, "LINE9", .CheckBox9
CheckBox 0, 181, 40, 10, "LINE10", .CheckBox10
CheckBox 0, 201, 40, 10, "LINE11", .CheckBox11
CheckBox 0, 221, 40, 10, "LINE12", .CheckBox12
CheckBox 0, 241, 40, 10, "LINE13", .CheckBox13
CheckBox 0, 261, 40, 10, "LINE14", .CheckBox14
CheckBox 0, 283, 40, 10, "LINE15", .CheckBox15
CheckBox 0, 303, 40, 10, "LINE16", .CheckBox16
CheckBox 0, 324, 40, 10, "LINE17", .CheckBox17
Text 44, 34, 96, 8, "Please check the checkboxes"
Text 42, 46, 120, 9, " test "
Text 44, 59, 135, 10, " test"
CheckBox 0, 346, 40, 10, "LINE18", .CheckBox18
CheckBox 0, 366, 40, 10, "LINE19", .CheckBox19
CheckBox 0, 385, 40, 10, "LINE20", .CheckBox20
Picture 135, 0, 47, 32, "H:\My Pictures\test.bmp", 16, .test
Text 45, 78, 76, 8, "And then click OK -->"
End Dialog
Dim my_dialog as cbdlg
On Error Resume Next
Dialog my_dialog
If Err=102 then
MsgBox "canceled."
End If
' Set the default wait timeout value
g_HostSettleTime = 400 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
If my_dialog.CheckBox1 Then
' This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CCM 01 4837 999<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab>DS<Tab><Tab><Tab>02<Tab><Tab><Tab><Tab><Tab>TEST<Tab>02100<Enter>")
Sess0.Screen.Sendkeys("<Clear>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'Sess0.Screen.Sendkeys("CDS<Enter>")
'Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CSD4 01<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Tab><Tab><Tab>01<Tab><Tab><Tab><Tab><Tab><Tab>1<Tab><Tab><Tab><Tab><Tab><Tab>11<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>u<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Clear>")
If my_dialog.CheckBox2 Then
' This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CCM 02 4837 999<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab>DS<Tab><Tab><Tab>02<Tab><Tab><Tab><Tab><Tab>UNAUTH TRANS<Tab>02100<Enter>")
Sess0.Screen.Sendkeys("<Clear>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'Sess0.Screen.Sendkeys("CDS<Enter>")
'Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CSD4 02<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Tab><Tab><Tab>01<Tab><Tab><Tab><Tab><Tab><Tab>1<Tab><Tab><Tab><Tab><Tab><Tab>11<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>u<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Clear>")
If my_dialog.CheckBox3 Then
' This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CCM 03 4837 999<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Tab><Tab><Tab><Tab>DS<Tab><Tab><Tab>02<Tab><Tab><Tab><Tab><Tab>TEST<Tab>02100<Enter>")
Sess0.Screen.Sendkeys("<Clear>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'Sess0.Screen.Sendkeys("CDS<Enter>")
'Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
'This section of code contains the recorded events
Sess0.Screen.Sendkeys("<Home>CSD4 03<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Tab><Tab><Tab>01<Tab><Tab><Tab><Tab><Tab><Tab>1<Tab><Tab><Tab><Tab><Tab><Tab>11<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>u<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Clear>")
System.TimeoutValue = OldSystemTimeout
End If
End If
End If
End Sub