R
RB Smissaert
Need to set the cursor in Excel with the API, so tried this:
Option Explicit
Private Const IDC_ARROW As Long = 32512
Private Declare Function LoadCursor _
Lib "user32" _
Alias "LoadCursorA" _
(ByVal hInstance As Long, _
ByVal lpCursorName As Long) As Long
Private Declare Function SetCursor _
Lib "user32" (ByVal hCursor As Long) As Long
Sub test()
Application.Cursor = xlWait 'just to test it alters the cursor
SetCursor (LoadCursor(0, IDC_ARROW))
End Sub
However nil happens, although there is no error.
Any suggestions how this could be done?
RBS
Option Explicit
Private Const IDC_ARROW As Long = 32512
Private Declare Function LoadCursor _
Lib "user32" _
Alias "LoadCursorA" _
(ByVal hInstance As Long, _
ByVal lpCursorName As Long) As Long
Private Declare Function SetCursor _
Lib "user32" (ByVal hCursor As Long) As Long
Sub test()
Application.Cursor = xlWait 'just to test it alters the cursor
SetCursor (LoadCursor(0, IDC_ARROW))
End Sub
However nil happens, although there is no error.
Any suggestions how this could be done?
RBS