Isaac
Lifelong Learner
- Local time
- Yesterday, 16:39
- Joined
- Mar 14, 2017
- Messages
- 11,033
Hi, I have a publicly available Excel file like this:
I need to be able to grab a copy of that file using VBA. At first I thought it might be as easy as using Excel VBA's Workbooks.Open(path/URL) method, but that returned "Unable to open the file, the file may not exist" (etc) - from the excel application object
Then I tried Application.FollowHyperlink (thinking, once it's opened, I'll use GetObject to set the Excel application object, then that object's Workbooks() to grab the now-open named workbook) - but that failed on the Application.FollowHyperlink - cannot open the specified file.
When the client simply sends me a word document with the link - I click on it, get the Security prompt - and then the file simply opens, directly in Excel, no problem.
What's a good method in VBA to either open this file in Excel, or actually Download a copy of it?
Code:
https://something.something.com/something/01resources/FileName.xlsx
I need to be able to grab a copy of that file using VBA. At first I thought it might be as easy as using Excel VBA's Workbooks.Open(path/URL) method, but that returned "Unable to open the file, the file may not exist" (etc) - from the excel application object
Then I tried Application.FollowHyperlink (thinking, once it's opened, I'll use GetObject to set the Excel application object, then that object's Workbooks() to grab the now-open named workbook) - but that failed on the Application.FollowHyperlink - cannot open the specified file.
When the client simply sends me a word document with the link - I click on it, get the Security prompt - and then the file simply opens, directly in Excel, no problem.
What's a good method in VBA to either open this file in Excel, or actually Download a copy of it?
Last edited: