ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ScrollBar1_Change() problem (https://www.excelbanter.com/excel-programming/285799-scrollbar1_change-problem.html)

Dusan

ScrollBar1_Change() problem
 
Hi there,

I use several scrollbars in my excel application and my problem is
following:
I do some calculation when any scrollbar value is changed by writing a
ScrollBar_Change()
procedure. It works fine when I use "step up/down" buttons ... but when I
change to different
ScrollBar e.g. ScrollBar2 (before I used ScrollBar1) and I select the middle
square (or slider?) and move
the slider the procedure ScrollBar_Change() is not called. If I move the
same slider one more time it works.
This happens just very first time when scroll bar is changed. It seams that
scroll bar needs to be selected first.

For up/down buttons it works straight away after changing scroll bars.

Any idea how to solve this?
Thanks
Dusan









onedaywhen

ScrollBar1_Change() problem
 
As a workwround, how about calling the _Change event in the _GotFocus event e.g.

Private Sub ScrollBar1_GotFocus()
ScrollBar1_Change
End Sub

--

"Dusan" <a@a wrote in message ...
Hi there,

I use several scrollbars in my excel application and my problem is
following:
I do some calculation when any scrollbar value is changed by writing a
ScrollBar_Change()
procedure. It works fine when I use "step up/down" buttons ... but when I
change to different
ScrollBar e.g. ScrollBar2 (before I used ScrollBar1) and I select the middle
square (or slider?) and move
the slider the procedure ScrollBar_Change() is not called. If I move the
same slider one more time it works.
This happens just very first time when scroll bar is changed. It seams that
scroll bar needs to be selected first.

For up/down buttons it works straight away after changing scroll bars.

Any idea how to solve this?
Thanks
Dusan



All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com