I have varying number of records all in one column, starting at A2. There maybe 1,000 or 20,000 records. What I am trying to do is grab 18 rows from a spreadsheet, switch over to Extra! /Attachmate paste the 18 rows then enter them, then go back to Excel grab the next 18 rows switch back over to Extra! /Attachmate, paste and enter these 18 rows and repeat these same steps until all the records are updated.
Below is code from a previous thread which I modified “For Rows = 1 To 18, which does one row at a time and stop at the 18th record. So that doesn’t work.
Can anyone help here?
'Declare the Excel Object
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:="D:\Shared Team\IVR_Bulk_Update.xls"
Set xlSheet = xlApp.activesheet
Set MyRange = xlApp.activesheet.Range("A:A")
Dim Row As Long
With xlApp.ActiveSheet
Set MyRange = .Range("A2:A65536").Resize(xlApp.CountA(.Range("A2:A65536")))
End With
For Rows = 1 To 18
Sess0.Screen.PutString MyRange.Rows(Rows).Value, 5, 18
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Next Rows
End Sub
Below is code from a previous thread which I modified “For Rows = 1 To 18, which does one row at a time and stop at the 18th record. So that doesn’t work.
Can anyone help here?
'Declare the Excel Object
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:="D:\Shared Team\IVR_Bulk_Update.xls"
Set xlSheet = xlApp.activesheet
Set MyRange = xlApp.activesheet.Range("A:A")
Dim Row As Long
With xlApp.ActiveSheet
Set MyRange = .Range("A2:A65536").Resize(xlApp.CountA(.Range("A2:A65536")))
End With
For Rows = 1 To 18
Sess0.Screen.PutString MyRange.Rows(Rows).Value, 5, 18
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Next Rows
End Sub