I am trying to write a vbs program where I navigate to a web page, click on a link that opens a file in excel, then run a macro in the excel file. I know how to navigate to a web page and click on a link. I need help figuring out how I store the excel file in a way that the vbs program can manipulate it.
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate ("https://www.whateverWebsite.com/")
Dim LinkHref
LinkHref = "analyze" 'the key word that will be in the link to click
Dim a
For Each a In IE.Document.GetElementsByTagName("a") ' for every element whose tag name starts with 'a' for "a href" pull out its contents
If InStr((a.GetAttribute("href")), LinkHref)>0 Then 'checks to see if the link that is set contains the string stored in LinkHref
a.Click 'click the link
End If
Next
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
Now how do I attach the excel file, that I opened with the link, to objExcel?