heavican03
New Member
First post here so be nice to me. I am trying to download an excel file from a website. The website has a button which can be pressed to download the excel file. I looked in the code and was able to come up with a url that if entered into IE takes me directly to the download open/save dialog box. I then used that url in vba in excel that works to open up the download box where it is asking to open or save the file.
I would like to save the file to the same name everytime as I am going to have another workbook that looks at the data and returns results.
I know this question has been asked a million times because I have searched and searched but no code I have tried will work.
This is my code so far
The website is an internal website so it will not work from the outside but I would think the code is the same either way.
I would like to save the file to the same name everytime as I am going to have another workbook that looks at the data and returns results.
I know this question has been asked a million times because I have searched and searched but no code I have tried will work.
This is my code so far
Code:
Sub TESTING()
'Need to reference to Microsoft Internet Controls
Dim URL As String
'URL = Worksheets("References & Resources").Range("URLMSL")
URL = "http://cts/Tacs/OperationDrillExport/76"
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True
IE.Navigate URL
Do While IE.ReadyState <> 4
DoEvents
Loop
End Sub