Downloading a CSV file from Website using VBA

ExcelTrader1

New Member
Joined
Nov 27, 2013
Messages
2
I'm looking to download a file from the site: "http://www.m-x.ca/endOfDayData/", with the file address being "http://www.m-x.ca/endOfDayData/DataBDM2013-11-26.csv". When I use the code
Rich (BB code):
 ActiveWorkbook.FollowHyperlink Address:="http://www.m-x.ca/endOfDayData/DataBDM" & Format(Now, "YYYY-MM-DD") & ".csv"
I get a pop-up from "Windows Security" Titled "Connect to www.m-x.ca" and requesting I enter a User & Password with the checkbox "Remember my credentials". When accessing this link using IE10, it asks whether I'd like to save or open, but no user/password. I get the impression this is a Windows issue, any ideas? (also, I'm using Windows 7 Home Version)
 
Last edited:
This worked for me:
Code:
Sub Get_File()
    Workbooks.Open "http://www.m-x.ca/endOfDayData/DataBDM2013-11-26.csv"
End Sub
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top