By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,563 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Mouse Wheel in Access 97

P: n/a
I have been trying desperately for the past few days to figure out why
the MouseWheel solution that I retrieved from the Lebans website won't
work. The access database included with the solution responds to the
the wheel regardless of the button. In my application I get an error
message when I try to set the class. I'm hoping that I can get some
help (cause I feel really stupid right now).

Before we go too much further, I am using a Logitech Wheel mouse, does
this make any difference?

I am using Access 97 on a Windows 2000 Professional OS. I downloaded
the files from the Lebans website. I made sure the MouseWheel.dll is
in the folder where I'm trying to figure out how to make this work in
my application.

I open the A97MouseWheelHookerver7.mdb file and open the form
(frmSampleData). Clicking the buttons to turn on or off the mouse
wheel still allows me to scroll through the everything regardless of
which button I click.

When I try to put the code in my own application I get an error on
this statement:

Set clsMouseWheel = New MouseWheel.cMouseWheel

The error message reads: Run Time error '429' ActiveX component can't
create object.

Yes, I've inserted all the code from the A97MouseWheelHookver97. I
tried registering the dll but get an error when trying to register
MouseHook.dll.
help!

Thanks in advance
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
The dll isn't registered, if you post the errors you get when registering
maybe someone can help.

Terry
"AccessWhiz" <md*******@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
I have been trying desperately for the past few days to figure out why
the MouseWheel solution that I retrieved from the Lebans website won't
work. The access database included with the solution responds to the
the wheel regardless of the button. In my application I get an error
message when I try to set the class. I'm hoping that I can get some
help (cause I feel really stupid right now).

Before we go too much further, I am using a Logitech Wheel mouse, does
this make any difference?

I am using Access 97 on a Windows 2000 Professional OS. I downloaded
the files from the Lebans website. I made sure the MouseWheel.dll is
in the folder where I'm trying to figure out how to make this work in
my application.

I open the A97MouseWheelHookerver7.mdb file and open the form
(frmSampleData). Clicking the buttons to turn on or off the mouse
wheel still allows me to scroll through the everything regardless of
which button I click.

When I try to put the code in my own application I get an error on
this statement:

Set clsMouseWheel = New MouseWheel.cMouseWheel

The error message reads: Run Time error '429' ActiveX component can't
create object.

Yes, I've inserted all the code from the A97MouseWheelHookver97. I
tried registering the dll but get an error when trying to register
MouseHook.dll.
help!

Thanks in advance

Nov 12 '05 #2

P: n/a
Terry Kreft previously wrote:
The dll isn't registered, if you post the errors you get when
registering
maybe someone can help.

Terry


There is no need to register it. It just has to be in the same folder as
the file that is using it.

I have just used the Mousewheel sample in an app and it worked first time.

Regards
Peter Russell


Nov 12 '05 #3

P: n/a
I click on the ActiveX Controls (in Tools), Register, browse to the
directory where the MouseHook.dll exists, click on MouseHook.dll, the
following error message pops up:

mousehook.dll cannot be added. Eiterh it is not an OLE control or it
requires a seperate setup utility.

The error message coincides with Lebans instructions which indicate
that the DLL does not need to be registered.

?????

"Terry Kreft" <te*********@mps.co.uk> wrote in message news:<bp**********@newsreaderm1.core.theplanet.net >...
The dll isn't registered, if you post the errors you get when registering
maybe someone can help.

Terry
"AccessWhiz" <md*******@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
I have been trying desperately for the past few days to figure out why
the MouseWheel solution that I retrieved from the Lebans website won't
work. The access database included with the solution responds to the
the wheel regardless of the button. In my application I get an error
message when I try to set the class. I'm hoping that I can get some
help (cause I feel really stupid right now).

Before we go too much further, I am using a Logitech Wheel mouse, does
this make any difference?

I am using Access 97 on a Windows 2000 Professional OS. I downloaded
the files from the Lebans website. I made sure the MouseWheel.dll is
in the folder where I'm trying to figure out how to make this work in
my application.

I open the A97MouseWheelHookerver7.mdb file and open the form
(frmSampleData). Clicking the buttons to turn on or off the mouse
wheel still allows me to scroll through the everything regardless of
which button I click.

When I try to put the code in my own application I get an error on
this statement:

Set clsMouseWheel = New MouseWheel.cMouseWheel

The error message reads: Run Time error '429' ActiveX component can't
create object.

Yes, I've inserted all the code from the A97MouseWheelHookver97. I
tried registering the dll but get an error when trying to register
MouseHook.dll.
help!

Thanks in advance

Nov 12 '05 #4

P: n/a
Okay, I finally was able to get things going with the results that I
wanted. I ended up using the solution that was published in the MSKB
article KB308636 (http://support.microsoft.com/default...&Product=acc97)

In order to deploy this application to multiple computers without
having to register the dll on each machine, this is the solution I
created:

1. Create a new module.
2. Insert the following code:

Option Compare Database
Option Explicit
Declare Function DllRegisterServer Lib "<fullpath>:\MouseWheel.dll" ()
As Long
Declare Function DllUnregisterServer Lib "<fullpath>:\MouseWheel.dll"
() As Long

3. Open the form and add the following:
Option Compare Database
Option Explicit
Private WithEvents clsMouseWheel As MouseWheel.cMouseWheel
Private varRegister As Variant

4. In the Form_Load event add the following:
varRegister = DllRegisterServer
Set clsMouseWheel = New MouseWheel.cMouseWheel
Set clsMouseWheel.Form = Me
clsMouseWheel.SubClassHookForm

5. In the Form_Close event add the following:
clsMouseWheel.SubClassUnHookForm
Set clsMouseWheel.Form = Nothing
Set clsMouseWheel = Nothing
varRegister = DllUnregisterServer

6. Create a new sub in the form:
Private Sub clsMouseWheel_MouseWheel(Cancel As Integer)
' Optionally add messages here to indicate Mouse Wheel is
inappropriate
' i.e. MsgBox "Mouse Wheel cannot be used here!"
Cancel = True
End Sub

This process has worked for me on Access 97.

md*******@hotmail.com (AccessWhiz) wrote in message news:<19**************************@posting.google. com>...
I have been trying desperately for the past few days to figure out why
the MouseWheel solution that I retrieved from the Lebans website won't
work. The access database included with the solution responds to the
the wheel regardless of the button. In my application I get an error
message when I try to set the class. I'm hoping that I can get some
help (cause I feel really stupid right now).

Before we go too much further, I am using a Logitech Wheel mouse, does
this make any difference?

I am using Access 97 on a Windows 2000 Professional OS. I downloaded
the files from the Lebans website. I made sure the MouseWheel.dll is
in the folder where I'm trying to figure out how to make this work in
my application.

I open the A97MouseWheelHookerver7.mdb file and open the form
(frmSampleData). Clicking the buttons to turn on or off the mouse
wheel still allows me to scroll through the everything regardless of
which button I click.

When I try to put the code in my own application I get an error on
this statement:

Set clsMouseWheel = New MouseWheel.cMouseWheel

The error message reads: Run Time error '429' ActiveX component can't
create object.

Yes, I've inserted all the code from the A97MouseWheelHookver97. I
tried registering the dll but get an error when trying to register
MouseHook.dll.
help!

Thanks in advance

Nov 12 '05 #5

P: n/a
The dll does not need to be registered is probably a big clue <g>.

It's not an ActiveX dll it's a classic C .dll which exports the functions
you need to call.

The sample database you downloaded with it has sample code to show how it
should be used.

Terry
"AccessWhiz" <md*******@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
I click on the ActiveX Controls (in Tools), Register, browse to the
directory where the MouseHook.dll exists, click on MouseHook.dll, the
following error message pops up:

mousehook.dll cannot be added. Eiterh it is not an OLE control or it
requires a seperate setup utility.

The error message coincides with Lebans instructions which indicate
that the DLL does not need to be registered.

?????

"Terry Kreft" <te*********@mps.co.uk> wrote in message

news:<bp**********@newsreaderm1.core.theplanet.net >...
The dll isn't registered, if you post the errors you get when registering maybe someone can help.

Terry
"AccessWhiz" <md*******@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
I have been trying desperately for the past few days to figure out why
the MouseWheel solution that I retrieved from the Lebans website won't
work. The access database included with the solution responds to the
the wheel regardless of the button. In my application I get an error
message when I try to set the class. I'm hoping that I can get some
help (cause I feel really stupid right now).

Before we go too much further, I am using a Logitech Wheel mouse, does
this make any difference?

I am using Access 97 on a Windows 2000 Professional OS. I downloaded
the files from the Lebans website. I made sure the MouseWheel.dll is
in the folder where I'm trying to figure out how to make this work in
my application.

I open the A97MouseWheelHookerver7.mdb file and open the form
(frmSampleData). Clicking the buttons to turn on or off the mouse
wheel still allows me to scroll through the everything regardless of
which button I click.

When I try to put the code in my own application I get an error on
this statement:

Set clsMouseWheel = New MouseWheel.cMouseWheel

The error message reads: Run Time error '429' ActiveX component can't
create object.

Yes, I've inserted all the code from the A97MouseWheelHookver97. I
tried registering the dll but get an error when trying to register
MouseHook.dll.
help!

Thanks in advance

Nov 12 '05 #6

P: n/a
Peter,
Yes I was distracted by the Error 429, further information from the original
poster shows he was in error in trying to use the dll as an an ActiveX dll
rather than the classic C dll which it is.

Terry
"Peter Russell" <ru***@127.0.0.1> wrote in message
news:me**********************@russellscott.btinter net.com...
Terry Kreft previously wrote:
The dll isn't registered, if you post the errors you get when
registering
maybe someone can help.

Terry


There is no need to register it. It just has to be in the same folder as
the file that is using it.

I have just used the Mousewheel sample in an app and it worked first time.

Regards
Peter Russell

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.