• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Click an element from a dropdown list

HanSam

Member
So I have this code that I want to communicate wit IE to click a certain button? or element? (not sure what it is called).

The IE code when the button is already clicked shows:

63112

Code:
Sub Download090()

Dim URL As String
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object

Set IE = CreateObject("InternetExplorer.Application")
URL = "http://dehensv035:100/"

With IE
    .Navigate URL
    .Visible = True
End With

While IE.Busy
    DoEvents
Wend

Set objCollection = IE.Document.getelementbyName("ReportGroups[4].Reports[7].ReportID")

objCollection.Click

End Sub

Please help.
 
Code:
Set objCollection = IE.Document.getelementbyName("ReportGroups[4].Reports[7].ReportID")

Above will likely cause issue. It's known issue when using IE library without explicit reference (i.e. early binding).

Instead, find the element that you are after using .getElementByID() and setting it's value.
 
Back
Top