question

Excel123-9130 avatar image
0 Votes"
Excel123-9130 asked anuragt edited

URLTODOWNLOADFILE - VBA (EXCEL) Issue with IE11

Hi,

I was wondering if someone could help.

I have been using URLTODOWNLOADFILE function in excel for about a year and it has worked perfectly until around a month ago when the website I was pulling the files from no longer supports IE11. I also believe IE11 is ending next year if I am not mistaken

I was wondering is there a possibility to set this function to use edge natively or alternatively use VBA in excel to open a url which will always be a file say in column B and then place it in a folder named in column c and then the filenamee in column d. As that is what I have currently using this function.

It would have to cycle through the whole sheet until there is no more files url's to open.

office-vba-devoffice-excel-itpro
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Excel123-9130
As this issue is more realted to VBA code, but tag "office-excel-itpro" focus more on general Excel client, I would modify the tag.
Thanks for your understanding.

0 Votes 0 ·

Hi @emilyhua-msft ,

Thank you for your advice, this is my first post on this so a bit new to it, so thanks. I have now updated it with that tag.

Many Thanks,

0 Votes 0 ·

1 Answer

anuragt avatar image
0 Votes"
anuragt answered anuragt edited

Microsoft is pushing Edge on everyone, and probably that caused your issue.
This time, Microsoft didn't release anything for Edge automation using VBA thus standard codes will not be useful (for longer run) for Edge Automation.

Try using Shell Functions with Edge browser:

 'OpenURL5 "https://www.google.com"
 'Does not work for files
 'Opens using Microsoft Edge Browser
 Public Sub OpenURL5(ByVal sURL As String)
     Dim sCmd                  As String
     sCmd = "start microsoft-edge:" & sURL
     shell "cmd /c """ & sCmd & """", vbHide
 End Sub

(More info on Shell Function: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/shell-function)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.