Hello all,
I am creating a macro that navigates in a password protected website to fetch information in the form of excel documents. On the website, the user has to press on hyperlinks to get the excel documents.
When manually pressing the hyperlinks with my mouse, the open/save/cancel dialog box appears, which I don't know how to pass yet.
When my code "clicks" the hyperlinks, the information bar pops up, which I don't know how to pass either.
At the moment, I have looked at many forums and I would like to know if it is possible to code a "right-click" so I can Save As the excel document.
At the moment my code, for that part, looks like this:
I know it is hard to give some help with so little information, but a general solution or pointers would be helpful. Thank you
I am creating a macro that navigates in a password protected website to fetch information in the form of excel documents. On the website, the user has to press on hyperlinks to get the excel documents.
When manually pressing the hyperlinks with my mouse, the open/save/cancel dialog box appears, which I don't know how to pass yet.
When my code "clicks" the hyperlinks, the information bar pops up, which I don't know how to pass either.
At the moment, I have looked at many forums and I would like to know if it is possible to code a "right-click" so I can Save As the excel document.
At the moment my code, for that part, looks like this:
Code:
sub exceldocfetcher()
Set appIE = New InternetExplorer
sURL = "http://www.energystar.gov/index.cfm?c=evaluate_performance.bus_portfoliomanager"
'click the energy meter hyperlink
Set energymeter = appIE.document.getelementsbytagname("a") 'a is the tag name from the source file
For Each link In energymeter
If link.innerText = "View All Meter Data in Excel" Then 'the hyperlink
link.Click
Exit For
End If
Next link
'loop until the page finishes loading
With appIE
Do While .busy Or .ReadyState <> READYSTATE_COMPLETE
DoEvents
Loop
End With
end sub
I know it is hard to give some help with so little information, but a general solution or pointers would be helpful. Thank you