I am trying to click or call the function "Titlebar_simple_search" as shown on picture from VBA in Excel. It is on an intranet page on my workplace. I know I am far from the goal, but I am wondering if I can get some advice where to start.
Is HTMLdoc the best way? Should I first call the body class or div class that the function is located inside?
Any help is appreciated
Private Sub CommandButton4_Click()
Dim IE As Object
Set IE = New InternetExplorerMedium
IE.Visible = True
Url = "https://urlremovedduetoprivacy"
IE.Navigate Url
Do While IE.ReadyState = 4: DoEvents: Loop 'Do While
Do Until IE.ReadyState = 4: DoEvents: Loop 'Do Until
Application.Wait (Now + TimeValue("0:00:05"))
Dim HTMLdoc As HTMLDocument
Set HTMLdoc = IE.Document
HTMLdoc.getElementById("simple_search_link").Click
End Sub