Re: Scroll Event



Hi
If you want to be able to run a command regardless of where you are on
the ***, why not run the command from the menu bar?
regards
Paul

sonu wrote:

Any helps guys

sonu wrote:
Chip,

Thanks for the response.

That is the million dollar question. This is what I thought I could do
with class module.

My other low tech way is to run a on time sub on open and then every
second or 15 second run som code to see what is the top most visible
cell is in the window and if it changed from previous then run the
routine to set the position of the button again.

This sub would add additional overhed to the processor and that is why
I was trying to see if there is any other way I can do that.

Any help is really appreciated.

Thanks

Sonu




Chip Pearson wrote:
You can certainly create custom events in a class module. Suppose you
created an event called ScrollUp. How would you know when to raise the
event?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)

"sonu" <singhbx@xxxxxxxxx> wrote in message
news:1163085228.416896.109250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Chip,

But I thought we could create events that are not part of xls events by
using class module.

Is this not right?


Chip Pearson wrote:
I don't think you can do this, class module or not. There is no "scroll"
event for any object in Excel, so you would have no way of detecting when
the *** or window is scrolled.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)

"sonu" <singhbx@xxxxxxxxx> wrote in message
news:1163083805.143582.59630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How can I develop an event using class module that can detect if
current windows has been scrolled. either by using scroll bar or mouse
wheel.

I know little bit about class modules and develop a test event using
raise event and with event commands.

I read and used the article on the following link but still now sure
how to do this with scroll bar.

http://www.tushar-mehta.com/excel/vba/vba-xl%20event.htm



.