Excel 2019 Bible

(singke) #1

Part VI: Automating Excel


ScrollBar
A ScrollBar control is useful for specifying a cell value. Figure 45.6 shows a worksheet
with three ScrollBar controls. These ScrollBar controls are used to change the color in
the rectangle shape. The value of the ScrollBar control determines the red, green, or blue
component of the rectangle’s color. This example uses a few simple macros to change the
colors.

FIGURE 45.6
This worksheet has three ScrollBar controls.

The following are the most useful properties of a ScrollBar control:

Value The current value of the control
Min The minimum value for the control
Max The maximum value for the control
LinkedCell The worksheet cell that displays the value of the control
SmallChange The amount that the control’s value is changed by clicking the arrows
LargeChange The amount that the control’s value is changed by clicking in the scroll
area

The ScrollBar control is most useful for selecting a value that extends across a wide
range of possible values.
Free download pdf