Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

disable mousewheel

Status
Not open for further replies.

BeallDon

Technical User
Aug 20, 2007
46
CA
I'm trying to use Lebans coding to disable my mouse wheel (thread181-1370483) but when i do the recommended steps and then open my form, i get an error "Variable not defined" - which is referring to the "blRet". Any suggestions as to what i might be overlooking?
 
blRet is defined and used in the MouseWheelOFF() function of Stephan's code.

RuralGuy (RG for short) aka Allan Bunch MS Access MVP acXP winXP Pro
Please respond to this forum so all may benefit
 
Actually, now that I look at it the blRet variable is not used in that function. What line is giving you the error.

RuralGuy (RG for short) aka Allan Bunch MS Access MVP acXP winXP Pro
Please respond to this forum so all may benefit
 

Actually, Allan, it is used/defined in the MouseWheelOFF() function as

Dim blRet As Boolean

and should be dimmed as such in any event where it is subsequently used. The most common mistake people make with Stephan's beautiful hack is placing the appropriate code in their app to disable the wheel, but forgetting to actually import the modMouseHook module into their database.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Hi Linq,
I can see where it is Dimmed in that function but not where it is used. Care to point me in the right direction?

RuralGuy (RG for short) aka Allan Bunch MS Access MVP acXP winXP Pro
Please respond to this forum so all may benefit
 
Linq is probably on the right trail. I've used Stephan's code several times and continue to forget the modMouseHook.

Here is where blRet is used straight from Stephan's code:

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top