Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

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
 
Thanks
Dropped in addition and got same message(Update to x64...)
Maybe I put in wrong place? In top section of macro
 
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.

Part and Inventory Search

Sponsor