I'm getting this error on this piece of code
What I'm trying to do it get data from a queue in Extra and put it into excel. I'm not taking anything from excel to start, just going through the queue and hit alt8 to move to the next account. I'm also not sure what loop and if/else statement I will need to use. There are multiple queues some are 100 accounts, some are 5000 accounts so I'm not sure how to determine the end of the queue. Code is below. Thanks
Code:
ws.Cells(x, 1) = acct_num
Code:
Sub queues()
Dim Sessions, System As Object, Sess0 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
Dim ws As Worksheet
Set ws = ActiveWorkbook.Sheets("Sheet1")
acct_num = Sess0.Screen.GetString(3, 19, 10)
ws.Cells(x, 1) = acct_num
hold_date = Sess0.Screen.GetString(21, 26, 8)
ws.Cells(x, 2) = hold_date
hold_reason = Sess0.Screen.GetString(21, 44, 1)
ws.Cells(x, 3) = hold_reason
deman_exp = Sess0.Screen.GetString(4, 16, 8)
ws.Cells(x, 4) = demand_exp
Sess0.Screen.SendKeys ("<pf8>")
Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
End Sub