Explication de MACRO

Fermé
titoune - 8 mars 2009 à 23:00
gbinforme Messages postés 14946 Date d'inscription lundi 18 octobre 2004 Statut Contributeur Dernière intervention 24 juin 2020 - 9 mars 2009 à 10:16
Bonsoir

qq un pourrait m'expliquer cette macro VBA pour excel siouplé????

Option Explicit

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

Private Const ERROR_SUCCESS As Long = 0


Sub LancementProcedure()
DownloadFile _
"http://powerpoint.lesiteofficiel.net/dl.php?id=super-genie", "C:\bureau\i.ppt"
End Sub


Public Function DownloadFile(ByVal sURL As String, _
ByVal sLocalFile As String) As Boolean

Dim lngRetVal As Long
DownloadFile = URLDownloadToFile(0&, sURL, _
sLocalFile, 0&, 0&) = ERROR_SUCCESS
End Function

(trouvée ici https://www.excelforum.com/excel-programming-vba-macros/351768-download-zip-file-from-ftp-using-macro.html

merci
A voir également:

1 réponse

gbinforme Messages postés 14946 Date d'inscription lundi 18 octobre 2004 Statut Contributeur Dernière intervention 24 juin 2020 4 716
9 mars 2009 à 10:16
bonjour

Que veux-tu faire de cette macro ?

Le but des macros est de réaliser une fonction bien précise, si tu veux installer toutes les macros qui existent pour connaitre leur utilité tu as des heures à y consacrer.
0