返回 Microsoft Excel 控件类型。XlFormControl 类型,只读。
XlFormControl 可为以下 XlFormControl 常量之一。 |
xlButtonControl |
xlCheckBox |
xlDropDown |
xlEditBox |
xlGroupBox |
xlLabel |
xlListBox |
xlOptionButton |
xlScrollBar |
xlSpinner |
expression.FormControlType
expression 必需。该表达式返回“应用于”列表中的对象之一。
不能对 ActiveX 控件使用本属性(Shape 对象的 Type 属性必须返回 msoFormControl)。
本示例清除第一张工作表中的所有 Microsoft Excel 复选框。
For Each s In Worksheets(1).Shapes
If s.Type = msoFormControl Then
If s.FormControlType = xlCheckBox Then _
s.ControlFormat.Value = False
End If
Next