

'check box will be printed when the document is printed the user can interact with the control by using mouse, keystrokes, accelerators, or hotkeys) - enable the object
#HOW CAN I GET ACTIVEX CODE#
'True (for Enabled Property) indicates that the control can be accessed through a vba code & respond to user-generated events (ie. 'use the Locked Property of the Shapes object to lock it - if not Locked (False), the object can be modified when the sheet is protected
#HOW CAN I GET ACTIVEX FREE#
xlFreeFloating (Object is free floating - does not move or size with cells), xlMove (Object is moved with the cells), xlMoveAndSize (Object is moved and sized with the cells) 'Placement property determines how the object is attached to its underlying cells viz. Ws.CheckBoxes.Add(Left:=rng.Left, Top:=rng.Top, Width:=rng.Width, Height:=rng.Height).Select 'add a check box Form control - position & size the Check Box with the cell assigned to the rng variable 'Range.RowHeight Property returns or sets the height of the first row in the range, in points - to set or return the total height of a range of cells in points, use the Height property. 'Range.ColumnWidth Property returns or sets the width of all columns in the specified range, where one unit of column width is equal to the width of one character in the Normal style (width of the character zero is used for proportional fonts) - to return (does not set) the width of the range in points, use the Range.Width property If shpChBx.FormControlType = xlCheckBox Then shpChBx.Delete If TypeName(objChBx.Object) = "CheckBox" Then objChBx.Delete 'TypeName Function returns the data-type about a variable - TypeName(varname) 'With ws.CheckBoxes.Add(cell.Left, cell.Top, cell.Width, cell.Height)įor Each objChBx In ActiveSheet.OLEObjects 'a quick way of adding multiple checkboxes (Form Control) in a worksheet & then deleting: 'Add a Form Control Check Box with the CheckBoxes.Add Method, set properties for the Form control (CheckBox) object - Refer Image 3aĭim shpChBx As Shape, ws As Worksheet, rng As Range, objChBx As OLEObject Sub FormControl_CheckBox_Shape_Properties_1()
