64 bit - Declare - PtrSafe Attribut = pffffff
02.03.2019 11:33:05
Fred
Hallo Excel Profis,
ich bekomme bei folgenden Code eine Fehlermeldung die besagt, dass der Code auf 64-Bit-System aktualisiert werden soll,- ich die Declare-Anweisung aktualisieren soll und mit dem PtrSafe-Attribut markieren soll.
Option Explicit
Private Declare Function MakeSureDirectoryPathExists _
Lib "imagehlp.dll" (ByVal Pfad As String) As Long
Private Declare Function DeleteUrlCacheEntry Lib "wininet" Alias _
"DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
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 Sub GetFiles()
On Error GoTo Fin
LoadFiles "http://api.clubelo.com/" & Format(Now, "YYYY-MM-DD")
Fin:
If Err.Number 0 Then MsgBox "Error: " & _
Err.Number & " " & Err.Description
End Sub
Public Sub LoadFiles(ByVal strURL As String)
Dim strBackup As String
Dim lngTMP As Long
strBackup = Environ("UserProfile") & "\Desktop\ELO33\"
Call DeleteUrlCacheEntry(strURL)
Call MakeSureDirectoryPathExists(strBackup)
lngTMP = URLDownloadToFile(0, strURL, _
strBackup & "Aktuell.csv", 0, 0)
End Sub
Kann mir jemand helfen, entsprechender Umstellung auf 64 Bit System ...Mit freundlichen Gruß
Fred Neumann