I have the following code to download a file from the web but I have to manually do a Save As.
I would like to automate the Save As and I have tried to use the following method but am unable to get it to work.
I am also getting a "Run-time error '-2147467259 (80004005)': Method 'Busy' of object 'IWebBrowser 2' failed" that debugs to the While ieApp.Busy line.
Any help is appreciated.
Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Dim Filename As String
Dim ieApp As Object
Dim URL As String
URL = Range("All_Quad_URL")
Filename = "C:\Historic_Weather_Data\Precipitation\" & Range("File_Name").Value[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Set ieApp = CreateObject("InternetExplorer.Application")
ieApp.Visible = True
ieApp.Navigate URL
While ieApp.Busy Or ieApp.ReadyState <> 45
DoEvents
Wend
[/FONT][FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] ieApp.Quit
[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Set ieApp = Nothing
[/FONT]
I would like to automate the Save As and I have tried to use the following method but am unable to get it to work.
I am also getting a "Run-time error '-2147467259 (80004005)': Method 'Busy' of object 'IWebBrowser 2' failed" that debugs to the While ieApp.Busy line.
Any help is appreciated.