#1
|
|||
|
|||
VB runtime error in debugger...please help
I successfully ran this code yesterday, but today it is hanging up at this line and I'm not sure how to fix:
Set arr = ie.Document.getElementsByClassName("Button_Partner Style") <input type="submit" class="Button_PartnerStyle" value="TRACK IT" onclick="checkVariables()"> The code is as follows: Set ie = CreateObject("InternetExplorer.Application") my_url = "https://partners.lasership.com/Partners/" With ie .Visible = True .Navigate my_url Do Until Not ie.Busy And ie.ReadyState = 4 DoEvents Loop End With ' Input the userid and password ie.Document.getElementsByName("USER").Item(0).Valu e = "xxxxx" ie.Document.getElementsByName("PASS").Item(0).Valu e = "xxxxx" ie.Document.getElementsByName("imageField").Item(0 ).Click ie.Navigate "https://partners.lasership.com/Partners/ComponentsC/jobs/Tracking_Quick_02.cfm" Do Until Not ie.Busy And ie.ReadyState = 4 DoEvents Loop ie.Document.getElementsByName("start").Item(0).Val ue = Format(Forms("Laser Form")![Start Date], "mm/dd/yy") ie.Document.getElementsByName("end").Item(0).Value = Format(Forms("Laser Form")![End Date], "mm/dd/yy") ie.Document.getElementsByName("theID").Item(0).Val ue = Forms("Laser Form")![Client Number] Set arr = ie.Document.getElementsByClassName("Button_Partner Style") For Each a In arr a.Click Next a Do Until ie.Document.ReadyState = "complete" Loop Set arr = ie.Document.getElementsByClassName("Button_Partner Style") For Each a In arr If a.Value = "TRACK IT" Then a.Click Exit For End If Next a Do Until ie.Document.ReadyState = "complete" Loop Set arr = ie.Document.getElementsByName("Type") For Each a In arr If a.Value = "submit" Then a.Click Exit For End If Next a End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Runtime error R6034 | tallon | Excel | 4 | 07-08-2016 09:24 AM |
Selection.Interior cause runtime error | HalfNOoB | Excel Programming | 0 | 01-30-2015 04:53 AM |
runtime error 1004 | gbaker | Excel Programming | 11 | 06-06-2012 05:23 AM |
Runtime error 91 | waldux | Word VBA | 1 | 03-04-2011 11:25 PM |
Runtime error 5487 - Word cannot complete the save to to file permission error | franferns | Word | 0 | 11-25-2009 05:35 AM |