1

I am accessing a website using VBA Excel and trying to access the third <li> which is in the search_tab class. How can I click this <li> tag using VBA Excel code?

enter image description here

I have already opened Internet Explorer as IE and tried to the code below but it is not working.

For Each l In IE.document.getElementsByTagName("a")
    If l.href = "#SearchTab" Then
        l.Click
        Exit For
    End If
    Next
Community
  • 1
  • 1
nubteens
  • 5,462
  • 4
  • 20
  • 31
  • See [this Q/A](http://stackoverflow.com/questions/15997550/dom-click-is-not-working-on-this-button) for alternative approaches when click() is not working. – miroxlav Feb 08 '17 at 16:37
  • @miroxlav The link given does not seem to be excel-vba related – nubteens Feb 09 '17 at 11:48
  • Sure, but your question does not seem to address anything related to excel-vba. Based on its content, it should be re-tagged `html` + `javascript`. Perhaps you can check [ask] and improve the question. – miroxlav Feb 09 '17 at 11:54
  • Also do not forget to include part of your VBA code (this time as text, not image) where you are trying to perform the click action and errors you are getting. – miroxlav Feb 09 '17 at 12:03

0 Answers0