question

TrinhNghi-2431 avatar image
0 Votes"
TrinhNghi-2431 asked ·

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]: /answers/storage/attachments/70678-error.jpg

office-access-dev
error.jpg (267.1 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Robert-6510 avatar image
0 Votes"
Robert-6510 answered ·

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

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.