Excel 64-Bit Deklaration
SteffenS
ich habe ein Programm, welchen sowohl unter 32-Bit (ab Excel 2003), als auch unter 64-Bit laufen soll.
In meinem Programm sind eine ganze Reihe von Deklarationen enthalten, welche ich alle in der Form:
If #VBA7 Then
Declare PtrSafe Function GetWindow Lib "USER32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
#Else
Declare Function GetWindow Lib "USER32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
#End If
darstellen müsste.
Gibt es irgeneine Möglichkeit diese Form zu vereinfachen. Meine Idee war hier schon:
Public x64 As String
#If VBA7 Then
x64 = "PtrSafe"
#Else
x64 = ""
#End If
Declare x64 Function GetWindow Lib "USER32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
leider funktioniert dies aber nicht.
Vielen lieben Dank schonmal.
Steffen Schmerler