Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I load a file from URL
Very simple question ...
what methods are there to load a file from a URL and then store it in a filesystem file? I'm doing this from VBA excel, but dont actually want (need) the information inside of excel - but that is where I need to initiate the transfer. A quick pointer to an approrpiate library/class would be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I load a file from URL
Uzytkownik "Peter" napisal w wiadomosci oups.com... Very simple question ... what methods are there to load a file from a URL and then store it in a filesystem file? I'm doing this from VBA excel, but dont actually want (need) the information inside of excel - but that is where I need to initiate the transfer. A quick pointer to an approrpiate library/class would be appreciated. You can use API's for it. In short like below: Public 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 Sub GetURLFile(URL As String, Filename As String) Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, Filename, 0, 0) If lngRetVal < 0 Then MsgBox "Problem with download " & URL & " file name " & Filename End If End Sub 'E.G.using: Sub Test() GetURLFile http://www.yourserver.com/fileTOdownload.jpg, "c:\downloaded.jpg" End Sub Regards Mario |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I load a file from URL
Hi Mario,
many thanks this is exactly what I wanted .. and already packaged into a standrd .dll. As a matter of interest, if there some way I could have discovered this existence of this function easily - without having to ask the worldwide community of developers? Many thanks anyway. Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to load .xla file automatically? | Excel Discussion (Misc queries) | |||
File did not load completely | New Users to Excel | |||
File will not load | Excel Discussion (Misc queries) | |||
Is it possible to load an .xls file | Excel Programming | |||
How to load a help file using VBA | Excel Programming |