Results 1 to 2 of 2

Thread: VBA - Website Search Bar with weird name
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Nov 2015
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Default VBA - Website Search Bar with weird name

    Hello all,

    I'm trying to automate going to the above site for a simple search feature in Excel and the name of the search bar comes back with a really long name. Is the name truly as long as it states or am I missing something? I have attached my VBA code as well so I an get his macro moving forward.

    Sub Test()
    Dim appIE As Object
    'Set appIE = Nothing
    Dim objElement As Object
    Dim objCollection As Object
    Set appIE = CreateObject("InternetExplorer.Application")
    sURL = ""
    With appIE
        .Navigate sURL
        .Visible = True
    End With
    Do While appIE.Busy 'Or appIE.ReadyState <> 4
    Set objCollection = appIE.Document.getElementsByTagName("
    ") Set appIE = Nothing End Sub

  2. #2
    Board Regular
    Join Date
    Oct 2007
    Post Thanks / Like
    7 Post(s)
    2 Thread(s)

    Default Re: VBA - Website Search Bar with weird name

    Yes, it's that long, but that's the id of the 'SEARCH BY ID' button, not its tag name. Therefore you want getElementById.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts