View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ranswert ranswert is offline
external usenet poster
 
Posts: 161
Default centering checkboxes vertical in cell

I used this code to center a checkbox vertically in a cell and I got a "run
time error object required message". This is the code I entered:

Sub cbox()
Dim cell As Range
Dim chk As Excel.CheckBox
Set cell = ActiveCell
Set chk = wsh.CheckBoxes.Add(cell.Left + 0.3 * cell.Width, cell.Top,
cell.Width, cell.Height)
chk.Height = cell.Height - 1.5

End Sub