I want to download videos with vba
successfully downloaded but the file can't open
my code
successfully downloaded but the file can't open
my code
VBA Code:
Option Explicit
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As LongPtr, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As LongPtr, ByVal lpfnCB As LongPtr) As Long
Dim Ret As Long
Sub try()
Dim strPath, FolderName As String
Dim Urlvideos As String
FolderName = "C:\New folder"
Urlvideos = "https://www.instagram.com/reel/Cka6tWaIjso/"
strPath = FolderName & "\" & "funny.mp4"
Ret = URLDownloadToFile(0, Urlvideos, strPath, 0, 0)
End Sub