Based this link:
i need to download the file comuni_geocoded.csv, and save in c:\test\comuni_geocoded.csv
see here:
i need to download the file comuni_geocoded.csv, and save in c:\test\comuni_geocoded.csv
see here:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Dim NOMEFILE As String, URLFILE As String
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub ESTRAI_DATA()
NOMEFILE = "comuni_geocoded.csv"
URLFILE = "[URL unfurl="true"]https://github.com/gnekt/geolocalizzazione-comuni-italiani/blob/main/comuni_geocoded.csv"[/URL]
DownloadFile URLFILE, "C:\Lavori_Vb6\COMUNI_GEOCODE\FILE\" & NOMEFILE
End Sub
Private Sub Command1_Click()
Call ESTRAI_DATA
End Sub