64bit & keine Ahnung
21.08.2023 07:34:08
depi1962
unser Excel wird von 32bit auf 64bit demnächst umgestellt. Ich teste bereits in der 64bit 2019-er Version unsere Excel-Tabellen aus und dabei sind zwei Laufzeitfehler (Beispiel 1 und 2) auffällig. Ich habe absolut keine Ahnung wozu das nötig ist und bräuchte mal Hilfe
Gefunden habe ich ein Beispiel, um 32- und 64bit Code ausführen zu lassen..
#if Vba7 then
' Code is running in the new VBA7 editor
#if Win64 then
' Code is running in 64-bit version of Microsoft Office
#else
' Code is running in 32-bit version of Microsoft Office
#end if
#else
' Code is running in VBA version 6 or earlier
#end if
#If Vba7 Then
Declare PtrSafe Sub...
#Else
Declare Sub...
#EndIf
aber wie kann ich dies umsetzen ?
Beispiel 1
Private Declare Function ShellExecute Lib "Shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Beispiel 2
Declare Function SHGetPathFromIDList Lib "shell32.dll" _
Alias "SHGetPathFromIDListA" _
(ByVal pidl As Long, ByVal pszPath As String) As Long
'Declare Function SHBrowseForFolder Lib "shell32.dll" _
Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
Besten Dank