Option Explicit
Private Declare Function URLDownloadToFileA Lib "urlmon" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Sub Test()
'Feuil1.Cells(1, 1) avec "https://file-examples-com.github.io/uploads/2017/10/file-sample_150kB.pdf"
DownloadFile Feuil1.Cells(1, 1), ThisWorkbook.Path & "\" & "Test.pdf"
End Sub
Private Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function