Click link in Internet Explorer

Craig

I've got a macro that I can use to log in to a website and authenticate myself, now I just need to add a section to click a button (which will download a .csv for me).

Here's the login code:

Sub WebLogin()

Set IE = CreateObject("InternetExplorer.Application")
With IE
    .Visible = True
    .Navigate "www.MYSITE.com"
    Do Until .ReadyState = 4
        DoEvents
    Loop
    .document.all.Item("edit-name").Value = "MY EMAIL"
    .document.all.Item("edit-pass").Value = "MY PASSWORD"
    .document.forms(0).submit


    Do While IE.Busy
    Application.Wait DateAdd("s", 1, Now)
    Loop

  End With

End Sub

So, that works fine. Once I'm logged in, here's the info for the button I'm trying to press:

<input name="_qf_GPDetail_submit_csv" value="Export to CSV" type="submit"  id="_qf_GPDetail_submit_csv" class="form-submit">

If anyone could help me out with a bit of code to click this, that'd be amazing!

Richard Lusch

Try:

IE.document.all("_qf_GPDetail_submit_csv").Click

This is a pretty good tutorial on the basics of Internet Explorer Automation. It got me an initial start.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Selenium click not working on Internet Explorer 11

Use Excel VBA to click on a button in Internet Explorer, when the button has no "name" associated

What would cause click events to stop working in Internet Explorer 11?

how to execute share point server via link in internet explorer

Excel VBA Internet explorer click button with no ID

How to click a button in Internet Explorer using VBA

Open link in Internet Explorer with POST data using javascript/jquery

Problem with double click on checkbox with Internet Explorer

Internet Explorer click an icon and a button of a specific line of a table

Google Script for opening a URL in dedicated browser (Internet Explorer) by click in Spreadsheets

Internet Explorer 10 Printing URL Below Link

Internet Explorer 11: Dragging a link to the new tab button no longer works

WinRT: Open link in internet explorer no matter the default browser

Right-click tabs doesn't work on Internet Explorer

Bootstrap dropdowns in internet explorer

Link shortener target URL changed, Internet Explorer goes to old link

vba intercept internet explorer link click

Click event is fired more than once in Internet explorer 9

link.click(); does not work in internet explorer while working in chrome

Permission denied for clicking link in Internet Explorer 11

WebElement.click() click on buttons but doesn't return in Internet Explorer

How to click "Login" button by navigating to webpage from Internet Explorer object?

How to click the hyperlink (<a> tag) in Internet Explorer through Excel VBA?

click on link text in internet explorer using vba

how to open link in internet explorer using html or any browser language?

Why doesn't support click handler event SVG element in Firefox and Safari and Internet Explorer?

Trigger button click event programmatically using JavaScript or jQuery on page load in Internet Explorer

VBA Internet Explorer Webpage Link Selection

Getting HTML link using Internet explorer with VBA excel (no code error but the results is wrong)