cant figure this one out, i keep getting this error
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Dim MyScreen As Object
Dim sSIN As String
Dim oRange As Object
Dim lNumber As Long
Set oRange = ThisWorkbook.Worksheets(1).Range("I:I")
lNumber = Application.WorksheetFunction.CountA(oRange)
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
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 75 ' 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
Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
RestartSIN:
sSIN = CStr(ThisWorkbook.Worksheets(1).Cells("I3").Value) <---error on this line
Select Case VBA.Len(sSIN)
Case 9
MyScreen.MoveTo 12, 43
MyScreen.SendKeys sSIN
MyScreen.SendKeys "<Enter>"
Do Until MyScreen.WaitHostQuiet(g_HostSettleTime) = True
DoEvents
Loop
End Select
System.TimeoutValue = OldSystemTimeout
End Sub
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Dim MyScreen As Object
Dim sSIN As String
Dim oRange As Object
Dim lNumber As Long
Set oRange = ThisWorkbook.Worksheets(1).Range("I:I")
lNumber = Application.WorksheetFunction.CountA(oRange)
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
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 75 ' 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
Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
RestartSIN:
sSIN = CStr(ThisWorkbook.Worksheets(1).Cells("I3").Value) <---error on this line
Select Case VBA.Len(sSIN)
Case 9
MyScreen.MoveTo 12, 43
MyScreen.SendKeys sSIN
MyScreen.SendKeys "<Enter>"
Do Until MyScreen.WaitHostQuiet(g_HostSettleTime) = True
DoEvents
Loop
End Select
System.TimeoutValue = OldSystemTimeout
End Sub