#If Win64 Then
Declare PtrSafe Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpDestString As LongPtr, ByVal lpSourceString As LongPtr) As Long
#Else
Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpDestString As Any, ByVal lpSourceString As Any) As Long
#End If
' --------------------------------------------------------
' Get any errors during execution of common dialogs
' --------------------------------------------------------
'32-bit Replacement
#If Win64 Then
Declare PtrSafe Function CommDlgExtendedError Lib "comdlg32.dll" () As Long
The error message say "Incompatible data types"?Yes, I add yes win64, ptrsafe, longptr, but these give me errors, just like I export to .accdb. But it doesn't work for me in 64 bit.
This is after adding the longptr
It must be!Are you sure the overall type of the function must be LongPtr?
That was one option to try, did you try to use the LongPtr at the very end as well?I changed it as you indicated, but it still doesn't work.
Declare PtrSafe Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpDestString As Any, ByVal lpSourceString As Any) As LongPtr
#If VBA7 Then
Declare PtrSafe Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpDestString As Any, ByVal lpSourceString As Any) As LongPtr
#Else
Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpDestString As Any, ByVal lpSourceString As Any) As Long
#End If
Declare PtrSafe Function GlobalFree Lib "kernel32" Alias "GlobalFree" (ByVal hMem As LongPtr) As LongPtr
Standard Windows will unzip it Mike?Using 7zip, I am unable to unzip your file. Try recreating the zip file again.
View attachment 108866