Hi!
I am attempting to copy some tables from a website. The site is secure so I can't share.
I got the table part fine. My problem is there can be 1 or a variable number of tables and to get to them one must click it's corresponding "Show History" .
We could have one Button or ten, who knows?
I can see in that K is being assigned 2 in the second loop as it's running, but get Runtime Error Index was outside the bounds of the array. If I debug and use 2 in place of the K as illustrated, it works fine.
This is in Chrome, Using Office 365 for windows.
What am I missing?
Thanks!
I am attempting to copy some tables from a website. The site is secure so I can't share.
I got the table part fine. My problem is there can be 1 or a variable number of tables and to get to them one must click it's corresponding "Show History" .
We could have one Button or ten, who knows?
VBA Code:
Dim iVal As Integer
iVal = bot.FindElementsByXPath("//*[@class='btn btn-primary btn-small margin10-r']").Count
For K = 1 To iVal
szoom = "0.50" ' to get everything visible
bot.ExecuteScript ("document.body.style.zoom = '" & szoom & "'")
bot.FindElementsByXPath("//*[@class='btn btn-primary btn-small margin10-r']")(K).Click ' <---- k works on the first loop but doesn't work when K=2
' bot.FindElementsByXPath("//*[@class='btn btn-primary btn-small margin10-r']")(2).Click <---- this works so I know 2 is correct
I can see in that K is being assigned 2 in the second loop as it's running, but get Runtime Error Index was outside the bounds of the array. If I debug and use 2 in place of the K as illustrated, it works fine.
This is in Chrome, Using Office 365 for windows.
What am I missing?
Thanks!