Max Property
Applies To
ControlFormat object.
Description
Returns or sets the maximum value of a scroll bar or spinner range. The scroll bar or spinner won't take on values greater than this maximum value. Read/write Long.
Remarks
The value of the Max property must be greater than the value of the Min property.
See Also
Min property.
Example
This example creates a scroll bar and sets its linked cell, minimum, maximum, large change, and small change values.
Set sb = Worksheets(1).Shapes.AddFormControl(xlScrollBar, _
Left:=10, Top:=10, Width:=10, Height:=200)
With sb.ControlFormat
.LinkedCell = "D1"
.Max = 100
.Min = 0
.LargeChange = 10
.SmallChange = 2
End With