Hi,
I'm trying to use VBA to select "Create New IB" from a list of items. Below is what i have right now.
I'm getting an error on the last line. Could anyone please help?
This is the java script i got from the website.
I'm trying to use VBA to select "Create New IB" from a list of items. Below is what i have right now.
I'm getting an error on the last line. Could anyone please help?
Code:
Sub test2()' open IE, navigate to the desired page and loop until fully loaded
Set ie = CreateObject("InternetExplorer.Application")
my_url = "website"
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.getElementById("login").Value = "testing"
ie.Document.getElementById("password").Value = "123"
' Click the "Login" button
ie.Document.getElementById("login-btn").Click
Do Until Not ie.Busy And ie.readyState = 4
DoEvents
Loop
ie.Document.getElementById("IB")(0).Click
End Sub
This is the java script i got from the website.
HTML:
<a href="javascript:void(0);">IB</a> <ul> <li><a href="createib.php">Create New IB</a></li> <li><a href="editib.php">Edit IB Info</a></li> <li><a href="createuserib.php">Create User IB</a></li> <li><a href="createprofile.php">Create New Profile</a></li>