Scroll Bar Control

K

Kim

I need a way where I can control a macro to control some scroll bar.

I'll have about 10 - 15 scroll bar. There will be a main scroll bar. When I
move the main scroll bar the rest of the scroll bar should move according to
the main one. If the main one is at 80, then the rest should be at 80.

For the rest of the scroll bar, I should be able to adjust them different.
For example,
if I move the main scroll bar to 80, the rest will move to 80. Then I would
probably amend scroll bar 2 to 75, scroll bar 5 to 85 and so on.

Is there a way I can do that?
 
J

JLatham

Assuming your scroll bars came from the Forms toolbar and are on a worksheet:
Assign each scroll bar's Cell Link to a different cell on the sheet. Let's
say that you assign the master scroll bar's Cell Link to cell X1, with the
other 9-14 scroll bar's linked to cells below that one (X2:X15). Then
right-click the master scroll bar and choose Assign Macro and 'New'. That
will set up a code stub for the _Change() event and you can put code like
this into it:

Sub ScrollBar1_Change()
Range("X2") = Range("X1")
Range("X3") = Range("X1")
Range("X4") = Range("X1")
'... for as many as you need
Range("X15") = Range("X1")
End Sub

That will cause all the others to move when the master changes, but still
allows the others to move independently later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top