Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

macro update for x64 2

Status
Not open for further replies.
Replies continue below

Recommended for you

Hi:

Just replace following in your code, it will work.

---------
Private Declare PtrSafe Function RemoveMenu Lib "user32" (ByVal hMenu As LongPtr, ByVal nPosition As LongPtr, _
ByVal wFlags As LongPtr) As Long

Private Declare PtrSafe Function GetSystemMenu Lib "user32" (ByVal hwnd As LongPtr, ByVal bRevert As LongPtr) As Long

Private Declare PtrSafe Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
-------------------------------------------

V K Amirtharaj
EGS Computers India Pvt Ltd
Dassault System SolidWorks Reseller
Chennai | Tamilnadu | India
 
Replace

Code:
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As LongPtr, ByVal nPosition As LongPtr, _
ByVal wFlags As LongPtr) As Long

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As LongPtr, ByVal bRevert As LongPtr) As Long

Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

with

Code:
Private Declare PtrSafe Function RemoveMenu Lib "user32" (ByVal hMenu As LongPtr, ByVal nPosition As LongPtr, _
ByVal wFlags As LongPtr) As Long

Private Declare PtrSafe Function GetSystemMenu Lib "user32" (ByVal hwnd As LongPtr, ByVal bRevert As LongPtr) As Long

Private Declare PtrSafe Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

or just add PtrSafe between the words Declare & Function
 
Status
Not open for further replies.
Back
Top