Skip to content

Files

Latest commit

author
Docs Allowlist Management
Mar 22, 2024
76d3237 · Mar 22, 2024

History

History
55 lines (34 loc) · 1.15 KB

Excel.ControlFormat.Max.md

File metadata and controls

55 lines (34 loc) · 1.15 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ControlFormat.Max property (Excel)
vbaxl10.chm630085
vbaxl10.chm630085
Excel.ControlFormat.Max
35ed65e1-94d7-c147-2535-d41c503bb19b
04/23/2019
medium

ControlFormat.Max property (Excel)

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.

Syntax

expression.Max

expression An expression that returns a ControlFormat object.

Return value

Long

Remarks

The value of the Max property must be greater than the value of the 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

[!includeSupport and feedback]