View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Can you Add Check Boxes??

Hi Bythsx-Addagio,

To add checkboxes programmatically, try something like:

'=============
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim rCell As Range

Set WB = ThisWorkbook
Set SH = WB.Sheets("Sheet1")
Set rng = SH.Range("B2:B120")

Application.ScreenUpdating = False
For Each rCell In rng.Cells
With SH.CheckBoxes.Add(rCell.Left + 5, rCell.Top - 2, 5, 5)
.Caption = ""
.LinkedCell = rCell.Address(False, False)
End With
rCell.Font.Color = vbWhite
Next rCell
Application.ScreenUpdating = True

End Sub
'<<=============


You can imsert a checkboxes manaully via:

View | Toolbars | Forms (or Control Toolbox)



---
Regards,
Norman



"Bythsx-Addagio" wrote in message
...
I'd like to add a column in a worksheet with check boxes to indicate steps
in
a procedure that have been completed for items in each row. And upon the
check boxes being marked have that row turn a different color and maybe
change cell values. I am pretty familar with macros and have used Forms
before, but what I am asking is if you can put a form object (checkbox)
directly on an excel spreadsheet??

Thanks for your help!