murray83
Games Collector
- Local time
- Today, 05:55
- Joined
- Mar 31, 2017
- Messages
- 770
So i have this code which works fine when its in the main VBA section
But then when i put it into a Module and then put
I get access shouting at me saying as in the attached. have tried searching on line but cant make out what i may have done wrong
cheers all for looking
Code:
'---------------------------------------------------------------------------------------
' Purpose : Use instead of hyperlink to change mouse cursor to pointing hand.
' Author : "Mister Slimm"
' Source : http://misterslimm.wordpress.com/2007/06/21/microsoft-access-2002-emulate-hyperlink-cursor-change/
' Adapted By: Mike Wolfe
' Reposted : https://nolongerset.com/usehand/
' Usage : Set OnMouseMove of control to =UseHand()
'---------------------------------------------------------------------------------------
Public Function UseHand()
Const IDC_HAND As Long = 32649&
' Load new cursor and, if successful, set it
Dim hLastCursor As Variant 'Long/LongPtr
hLastCursor = LoadCursor(0, CLng(IDC_HAND))
If (hLastCursor > 0) Then
hLastCursor = SetCursor(hLastCursor)
End If
End Function
But then when i put it into a Module and then put
Code:
Private Sub callhand()
Call UseHand
End Sub
I get access shouting at me saying as in the attached. have tried searching on line but cant make out what i may have done wrong
cheers all for looking