Hi, I have the following VBA code which works.
Currently, it opens a single URL, then clicks a couple of buttons.
I want to move away from having the URL string in the code.
Instead, I want the code to obtain URL from a list of hyperlinks on "Sheet1" column D.
Using a For each argument, each URL is opened and the buttons clicked.
I am a novice in VBA and have not mastered the For each coding, which I need now.
Your help will be appreciated.
Currently, it opens a single URL, then clicks a couple of buttons.
I want to move away from having the URL string in the code.
Instead, I want the code to obtain URL from a list of hyperlinks on "Sheet1" column D.
Using a For each argument, each URL is opened and the buttons clicked.
I am a novice in VBA and have not mastered the For each coding, which I need now.
Your help will be appreciated.
VBA Code:
Sub Assign()
Dim objIE As Object
Dim URL As String
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
URL = "https:/educationwebsite.org/course/1047/tutors/find?NameFilter=Ben+Hamilton"
objIE.Navigate URL
objIE.document.getElementById("select").Click
objIE.document.getElementById("add-button").Click
Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop
objIE.Quit
End Sub