Hello all,
i've read through many codes and none seem to be working for the URL or the csv file i'm trying to save.
The below code didn't save the file with my data looked like the below pic.
One code I've used:
Any help on why I can't save my file would be greatly appreciated.
JF
i've read through many codes and none seem to be working for the URL or the csv file i'm trying to save.
The below code didn't save the file with my data looked like the below pic.
One code I've used:
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 LongPtr
Sub SFDC_Rpt()
Dim FileURL As String
Dim SFilename As String
FileURL = "https://example.com/123q2341324ddEf?view=d&snip&export=1&enc=UTF-8&xf=csv"
SFilename = "C:\URLTest\Test.csv"
URLDownloadtoFile 0, FileURL, SFilename, 0, 0
End Sub
Any help on why I can't save my file would be greatly appreciated.
JF