You have to change the api call to a 64 bit version. I think that this is a 64 bit version but not positive.
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr
Can not use ribbon program for 64 bit

Dear all, I have an issue when changing access 365 from 32 bit to 64 bit OS. My applycation got error in this code: Public 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 and the system alarm: Compile error: " the code in this project must be updated for use on 64 bit systems. Please review and update Declare statement and then mark them with PtrSafe attribute" ![70678-error.jpg][1] [1]: /api/attachments/70678-error.jpg?platform=QnA
1 answer
Sort by: Most helpful
-
Robert 1 Reputation point
2021-03-05T19:50:24.943+00:00