VBA to click button to login to website
Results 1 to 2 of 2

Thread: VBA to click button to login to website
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    May 2004
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBA to click button to login to website

    Hi

    I'm trying to automate a log in for a website to put live pricing into excel.
    I can get it to fill in the username and password but the coding to click the 'Go' button doesn't work.

    The script for the buttin under 'inspect element' is:
    <input class="weebutton" type="submit" value="GO!" />
    input class="weebutton" type="submit" value="GO!"


    I have:

    Dim ele As MSHTML.IHTMLElement

    Dim eles As MSHTML.IHTMLElementCollection
    Set eles = idoc.getElementsByTagName("input")

    For Each ele In eles

    If ele.Value = "GO!" Then
    ele.Click
    Else
    End If

    Next ele

    End Sub

    Can anyone help?

    Many thanks
    N
    Last edited by nightracer; Jun 18th, 2019 at 11:51 AM.

  2. #2
    Board Regular
    Join Date
    May 2004
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA to click button to login to website

    Am still struggling with this if anyone can help?

    Thanks
    N

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
  •