RE: Linking multiple scrollbars based on value

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks, this helps in part.

I now need the VB code to go further so that when a scrollbar is modified,
the other change so that the total of all scrollbars is 100.

For example:
If i make scrollbar1 = 40, then scrollbars 2, 3, 4, and 5 need to
automatically recalculate so that each equals 15, making the total of all the
scrollbards equal to 100.

"Leung" wrote:


Hi

1st try to use the scroll bar from Control Toolbox rather than Form toolbar,
because it provide more flexibility for programming. After dragging the
first and 2nd toolbars then right-click it > view code, you will see the it
event sub of Scrollbar1_change()

if you want the scrollbar 2 change the same value as scrhollbar 1 change, so
add below code:

Me.ScrollBar2.value = scrollbar1.value

So everytime you change scrollbar1 then scrollbar 2 will change accordingly.

hope this help.

Leung



"Scott from Gippsland" wrote:

Hi,

I am developing a questionare in excel, and require the users to select an
answer based on a scroll bar, ranging from 1 -100. I have 5 questions, each
with its own scrollbar, which in total need to add up to 100.

Is it possible with VB to enable the scroll bars to automatically adjust so
that when one is changed, the others change accordingly.

Any assistance would be greatly appreciated.

Scott
.



Relevant Pages

  • Re: ScrollBar - set MIN/MAX cell value
    ... I can reset to begin working again if i manually run the event in Visual ... the scroll bar has the default name. ... Private Sub Worksheet_Change ... Dim ctrl As ScrollBar ...
    (microsoft.public.excel.programming)
  • Re: ScrollBar - set MIN/MAX cell value
    ... paste this into the sheet's cod page ... the scroll bar has the default name. ... Private Sub Worksheet_Change ... I'd like to use a scrollbar to allow users to change the "M1" value using ...
    (microsoft.public.excel.programming)
  • Re: [LH] OT: Question for Mac users out there
    ... When you get the Big Q you will see the scroll bar at the bottom. ... To the far right of that scrollbar you will see an arrow pointing down. ... Before clicking on the link to the mp3 hold down the button on your ... We are not Humans having a Spiritual Experience, ...
    (rec.music.gaffa)
  • Re: Slider bar continues to increment when mouse hovers over arrow
    ... Perhaps you could use a scroll bar from the Control ... It has a cell link, like the one from the Forms Toolbar. ... You are correct in that I mean a scrollbar. ... With the scroll bar, does the slider move? ...
    (microsoft.public.excel)
  • RE: Linking multiple scrollbars based on value
    ... 1st try to use the scroll bar from Control Toolbox rather than Form toolbar, ... After dragging the ... So everytime you change scrollbar1 then scrollbar 2 will change accordingly. ...
    (microsoft.public.excel.programming)