ActiveX
To create a check box cell and set its type
At run time,
- If your control contains more than one sheet, specify the sheet with which you want to work by setting the Sheet property.
- Set the Col, Col2, Row, and Row2 properties as appropriate.
- If you are selecting a block of cells, set the BlockMode property to True.
- Set the CellType property to 10 (Check Box).
-
Specify the horizontal and vertical alignment of the check box and text with the TypeHAlign and TypeVAlign properties.
If you want to center the check box and text horizontally and vertically in the cell, perform one of the following actions:
- Set the TypeCheckCenter property to True.
- Set the TypeHAlign and TypeVAlign properties to 2 (Center) and 2 (VCenter), respectively.
- If you want to provide a three-state check box, set the TypeCheckType property to 1 (Three-state).
- If you selected a block of cells, set the BlockMode property back to False.