Shapes.AddFormControl(XlFormControl, Int32, Int32, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a Microsoft Excel control. Returns a Shape object that represents the new control.
public:
Microsoft::Office::Interop::Excel::Shape ^ AddFormControl(Microsoft::Office::Interop::Excel::XlFormControl Type, int Left, int Top, int Width, int Height);
public Microsoft.Office.Interop.Excel.Shape AddFormControl (Microsoft.Office.Interop.Excel.XlFormControl Type, int Left, int Top, int Width, int Height);
Public Function AddFormControl (Type As XlFormControl, Left As Integer, Top As Integer, Width As Integer, Height As Integer) As Shape
Parameters
- Type
- XlFormControl
Required XlFormControl. The Microsoft Excel control type. You cannot create an edit box on a worksheet. Can be one of these XlFormControl constants:xlButtonControlxlCheckBoxxlDropDownxlEditBoxxlGroupBoxxlLabelxlListBoxxlOptionButtonxlScrollBarxlSpinner
- Left
- Int32
Required Integer. The initial coordinates of the new object (in points) relative to the upper-left corner of cell A1 on a worksheet or to the upper-left corner of a chart.
- Top
- Int32
Required Integer. The initial coordinates of the new object (in points) relative to the upper-left corner of cell A1 on a worksheet or to the upper-left corner of a chart.
- Width
- Int32
Required Integer. The initial size of the new object, in points.
- Height
- Int32
Required Integer. The initial size of the new object, in points.
Returns
Remarks
Use the AddOLEObject(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method or the Add(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) method of the OLEObjects collection to create an ActiveX control.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應