Posted to microsoft.public.excel.programming
|
|
Scroll Event
Chip,
Thanks. I will look into it. would it raised event when user scrolls?
Regards
Sonu
Chip Pearson wrote:
"NickHK" wrote in message
Short of getting into hooks/subclassing,
Subclassing is what I was thinking about, listening for a WM_VSCROLL and/or
a WM_HSCROLL message.
I've used with good success the freeware SSubTmr6 subclassing component from
www.vbaccelerator.com (http://www.vbaccelerator.com/codelib...mr/ssubtmr.htm) .
I can't recall if I've used it in VBA (I've used it many times in VB6), but
it should work without problems in VBA6. Now that I think about it, I'm
pretty sure I've used it at least for testing in VBA6. Its very simple to
use -- set a Reference, Implement the interface in your object module, and
you're good to go.
Then I bought the UniversalCOM Suite ($500 from DesaWare www.desaware.com)
than contains dozens of VB6/VBA/COM components, including one called
SpyWorks that, among other things, lets you subclass windows from other
processes. Very nice and very useful. I use that for my subclassing needs
now.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
(email address is on the web site)
"NickHK" wrote in message
...
Short of getting into hooks/subclassing, why not check the
ActiveWindow.VisibleRange
ActiveWindow.Panes(1).VisibleRange
in the SelectionChange event.
Not perfect, but at least will know if the user is looking at the same
area
of the WS or not.
NickHK
"sonu" wrote in message
ups.com...
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/vb...xl%20event.htm
|