title: VBA to login a website, click a link on the loaded web page and navigate further
body: <p>I am implementing a <code>VBA</code> code to auto-login to a website, then after login is successful, I need to auto click a <code>button/link</code> on the page and from there fill in another form and submit it. So far the code works for entering the login information and clicking submit. </p>
  
  <p>But from there on, the code doesn't click any link or button to proceed further. I don't receive any error upon debug. The code does not do anything after login.</p>
  
  <p><strong>Note:</strong> I am new to <code>VBA</code>, and need to implement this soon.</p>
  
  <p>Here is the code I'm working on:</p>
  
  <pre><code>option Explicit
  
  Public Sub Login_3_Website()
  
  Dim oHTML_Element As IHTMLElement
  'Dim oHTML_Elements As IHTMLElement
  Dim oHTML_Elements As Object
  Dim oHTML_Button As IHTMLButtonElement
  Dim oBrowser As InternetExplorer
  Dim HTMLDoc As IHTMLDocument
  'Dim Element As HTMLLinkElement
  Dim Element As Object
  Dim elements As Object
  Dim HTMLDocs As HTMLDocument
  Dim sURL As String
  
  'On Error GoTo Err_Clear
  sURL = Worksheets("Sheet1").Cells(2, "B").Value
  Set oBrowser = New InternetExplorer
  oBrowser.Silent = True
  'oBrowser.timeout = 20
  oBrowser.navigate sURL
  oBrowser.Visible = True
  
  Do
  ' Wait till the Browser is loaded
  Loop Until oBrowser.readyState = READYSTATE_COMPLETE
  
  Set HTMLDoc = oBrowser.document
  
  HTMLDoc.getElementById("login_username").Value = "aaa@gmail.com"
  
  HTMLDoc.getElementById("login_password").Value = "1234"
  For Each oHTML_Element In HTMLDoc.getElementsByTagName("button")
  If oHTML_Element.ID = "login_button" Then oHTML_Element.Click: Exit For
  Next oHTML_Element
  
  With oBrowser
  Do While .Busy Or .readyState &lt;&gt; 4
  DoEvents
  Loop
  End With
  
  'Set HTMLDocs = oBrowser.document
  'Set elements = HTMLDocs.getElementsByClassName("quick-access-trigger btn")
  'Element.Click
  'Next
  Set Element = HTMLDoc.getElementsByTagName("div")
  For Each oHTML_Elements In Element
  If oHTML_Elements.innerHTML = "Quick access" Then
  oHTML_Elements.Click
  End If
  Next
  End Sub
  </code></pre>
  
  <p>Please help me with this code and give me a way to fix it. The link I need to click on the page loaded after login has this code :</p>
  
  <pre><code>&lt;div class="quick-links-wrapper"&gt;== $0
  &lt;div class="quick-access-trigger btn"&gt;
  &lt;span&gt;Quick access&lt;/span&gt;
  &lt;i class="nc-icon-glyph arrows-1_bold-down"&gt;
  ::before
  &lt;/i&gt;
  &lt;/div&gt;
  </code></pre>