I need code to download an Excel file from the internet. I use the following code to connect to the site. Once at the site, Excel files are accessible by clicking individual download links which provide a "File Download Form" with "Open Save Cancel" buttons. I need code which will bypass this form and perform a Save As in "C:\Files\" and then close the IE. I only need code for one file (ex: href="ambulancefee0407.xls"). There are many files to choose from but an example for this one file will be sufficient.
Can someone please fill in the code?
Sub DownloadFile() Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") While IE.busy DoEvents Wend With IE .Visible = True .navigate "http://www.ncdhhs.gov/dma/fee/fee.htm" ' need code here which will perform Save As ' to "C:\Files\" and then close the IE. End With Set IE = Nothing End Sub ' DownloadFile