Save file from web page

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Save file from web page

Post by agibsonsw »

Hello.
I'm using the following code snippet to obtain an Excel file from the internet:

Code: Select all

Set ie = CreateObject("InternetExplorer.Application")
    With ie
        .Visible = True
        .Navigate "http://www.bankofengland.co.uk/statistics/yieldcurve/ukblc05.xls"
This gives me the Open/ Save dialog. Can I choose Save without having to click the button?
(I tried SendKeys unsuccessfully.)
Is there another way to do this without automating IE?
Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Save file from web page

Post by Jan Karel Pieterse »

You can simply use this:

Workbooks.Open "http://www.bankofengland.co.uk/statisti ... kblc05.xls"
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Save file from web page

Post by agibsonsw »

That's great!
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.