ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Scroll Bar Control (https://www.excelbanter.com/excel-discussion-misc-queries/250078-scroll-bar-control.html)

Kim

Scroll Bar Control
 
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?

JLatham

Scroll Bar Control
 
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.

"Kim" wrote:

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?



All times are GMT +1. The time now is 11:40 PM.

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