I think I'm missing something very small. This is a rather simple macro (so far) that I am building onto. The problem that I am having is that "Putstring" (highlighted below) is not putting the next row into attachmate after it completes the first loop.
Code:
Dim xlApp As Object, xlSheet As Object, MyRange As Object
Set xlApp = CreateObject("excel.application")
xlApp.Application.DisplayAlerts = False 'Turn off Warning Messages'
xlApp.Visible = True
xlApp.Workbooks.Open FileName:="C:\Users/Macros/OrderTracking.xlsx"
Set xlSheet = xlApp.ActiveSheet
Set myRange = xlApp.ActiveSheet.Range("A:A")
Dim Row As Long
With xlApp.ActiveSheet
Set myRange = .Range("A2:A2000").Resize(xlApp.CountA(.Range("A2:A2000")))
End With
For Row = 1 To myRange.Rows.Count
Sess0.Screen.Moveto 24,08
Sess0.Screen.Sendkeys("ortk<Tab>o")
[highlight #73D216]Sess0.Screen.PutString myRange.Rows(Row).Value, 24, 28[/highlight]
Sess0.Screen.Sendkeys("<Enter>")
Do Until Sess0.Screen.WaitForCursor (24,08)
DoEvents
Loop
XlSheet.cells(myrange.row+row-1, "B").value = Sess0.Screen.GetString(15,28,1)
XlSheet.cells(myrange.row+row-1, "C").value = Sess0.Screen.GetString(12,68,5)
XlSheet.cells(myrange.row+row-1, "D").value = Sess0.Screen.GetString(11,68,10)
If (Sess0.Screen.GetString(15,28,1) = "s") or (Sess0.Screen.GetString(15,28,1) = "r") or (Sess0.Screen.GetString(15,28,1) = "e") or (Sess0.Screen.GetString(15,28,1) = "d") Then
XlSheet.cells(myrange.row+row-1, "E").putstring = ("REJECTED / SUSPENDED")
End if
Sess0.Screen.Sendkeys("<Pf10>")
Next Row
xlApp.Quit
Set xlApp = Nothing
System.TimeoutValue = OldSystemTimeout
End Sub