Spin Button control

The SpinButton control lets the user select a value by clicking the control, which has two arrows (one to increase the value and the other to decrease the value). Figure 17-15 shows a dialog box that uses two SpinButton controls. Each control is linked to the Label control on the right (by using VBA procedures).

Figure 17-15:

SpinButton controls.

Figure 17-15:

SpinButton controls.

The following descriptions explain the most useful properties of a SpinButton control:


t Value: The control's current value. t Min: The control's minimum value. t Max: The control's maximum value.

t ControlSource: The worksheet cell that displays the control's value.

t SmallChange: The amount that the control's value is changed by a click. Usually this property is set to 1, but you can make it any value.

If you use a ControlSource for a SpinButton, you should understand that the worksheet is recalculated every time the control's value is changed. Therefore, if the user changes the value from 0 to 12, the worksheet is calculated 12 times. If your worksheet takes a long time to calculate, you may want to avoid using a ControlSource to store the value.

Was this article helpful?

0 0

Post a comment