Can not use ribbon program for 64 bit

Trinh Nghi 1 Reputation point
2021-02-22T13:10:40.61+00:00

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

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
846 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Robert 1 Reputation point
    2021-03-05T19:50:24.943+00:00

    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

    0 comments No comments