....just bumping this up a bit!
I want to be able to force the mouse pointer to a cross hair icon so that
users can pick off values from a graph easily. Unfortunatley the
Application.Cursor property does not have this flexibility.
This SetCursor API function should work in theory, but seems to be overuled
by the Excel app?
Thanks again,
Dave
"Dave Ramage" wrote:
Hello..
I'm attempting to use API functions to change the mouse cursor to a
crosshair when a certain chart is activated. Have pulled some code off
another post, but it does not seem to work. Does anyone have any other
sugestions:
Code sample:
Private Declare Function LoadCursorBynum 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
Public Const IDC_CROSS = 32515& ' Crosshair
Public Function MouseCursor(CursorType As Long)
Dim lngRet As Long
lngRet = LoadCursorBynum(0&, CursorType)
lngRet = SetCursor(lngRet)
End Function
Thanks,
Dave
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/comm...el.programming