PDA

View Full Version : Solved: Scrollbar Control Reverse counting



Sowanso
05-24-2008, 11:00 AM
Hi,

I have an userform containing a label and a ScrollBar. From the beginning value of the scrollbar is 0 which is also displayed in the label. Everytime I use the scrollbar value in the label updates (label.caption = scrollbar.value on scrollbar_change). However my problem is that the scrollbar is counting in opposite direction which means that at the beginning its thumb is at the very top and I need to move it downwards to increase its value. It is not very intuitive and I wonder if it is possible to switch the direction. I would greatly appreciate any help on this topic.

Ondrej :think:

lucas
05-24-2008, 11:56 AM
Hi Ondrej,
It would help if you could post a small example of just your problem. It saves us having to re-create the whole thing just to see what the problem is.

malik641
05-24-2008, 09:09 PM
How is that not intuitive? When you read something you start from the top and work your way down...I would naturally think the scrollbar value would increase in size when it moves downward.

And to get it to do the OPPOSITE of that, it's easier than you think:
Private Sub ScrollBar1_Change()
Label1.Caption = ScrollBar1.Max - ScrollBar1.Value
End Sub

Private Sub UserForm_Initialize()
Label1.Caption = ScrollBar1.Max
End Sub

Sowanso
05-25-2008, 01:09 AM
Hi malik,
I meant that it is not very intuitive for user when using the scrollbar for my purposes. However your solution seems to be the simplest I came across. Thanks!