The Idea Dude
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 591
- Office Version
- 2016
- Platform
- Windows
Hi All,
I just upgraded to Excel 2013 and now am getting an error saying I need to update my code to allow for 64bit.
I tried changing to Declare PtrSafe Function but that didn't help.
Any help is appreciated.
The code that is generating the error is:
<code>
Private Declare Function GetCurrentThreadId _
Lib "kernel32" () _
As Long
Private Declare Function GetDesktopWindow _
Lib "user32" () _
As Long
Private Declare Function GetWindowLong _
Lib "user32" _
Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) _
As Long
Private Declare Function MessageBox _
Lib "user32" _
Alias "MessageBoxA" ( _
ByVal hwnd As Long, _
ByVal lpText As String, _
ByVal lpCaption As String, _
ByVal wType As Long) _
As Long
Private Declare Function SetDlgItemText _
Lib "user32" _
Alias "SetDlgItemTextA" ( _
ByVal hDlg As Long, _
ByVal nIDDlgItem As Long, _
ByVal lpString As String) _
As Long
Private Declare Function SetWindowsHookEx _
Lib "user32" _
Alias "SetWindowsHookExA" ( _
ByVal idHook As Long, _
ByVal lpfn As Long, _
ByVal hmod As Long, _
ByVal dwThreadId As Long) _
As Long
Private Declare Function SetWindowText _
Lib "user32" _
Alias "SetWindowTextA" ( _
ByVal hwnd As Long, _
ByVal lpString As String) _
As Long
Private Declare Function UnhookWindowsHookEx _
Lib "user32" ( _
ByVal hHook As Long) _
As Long
</code>
I just upgraded to Excel 2013 and now am getting an error saying I need to update my code to allow for 64bit.
I tried changing to Declare PtrSafe Function but that didn't help.
Any help is appreciated.
The code that is generating the error is:
<code>
Private Declare Function GetCurrentThreadId _
Lib "kernel32" () _
As Long
Private Declare Function GetDesktopWindow _
Lib "user32" () _
As Long
Private Declare Function GetWindowLong _
Lib "user32" _
Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) _
As Long
Private Declare Function MessageBox _
Lib "user32" _
Alias "MessageBoxA" ( _
ByVal hwnd As Long, _
ByVal lpText As String, _
ByVal lpCaption As String, _
ByVal wType As Long) _
As Long
Private Declare Function SetDlgItemText _
Lib "user32" _
Alias "SetDlgItemTextA" ( _
ByVal hDlg As Long, _
ByVal nIDDlgItem As Long, _
ByVal lpString As String) _
As Long
Private Declare Function SetWindowsHookEx _
Lib "user32" _
Alias "SetWindowsHookExA" ( _
ByVal idHook As Long, _
ByVal lpfn As Long, _
ByVal hmod As Long, _
ByVal dwThreadId As Long) _
As Long
Private Declare Function SetWindowText _
Lib "user32" _
Alias "SetWindowTextA" ( _
ByVal hwnd As Long, _
ByVal lpString As String) _
As Long
Private Declare Function UnhookWindowsHookEx _
Lib "user32" ( _
ByVal hHook As Long) _
As Long
</code>