S
Slim Slender
I'm using the following bit of code adapted from something I found
here to place some check boxes on a worksheet.
Sub InsertCheckBoxes()
'from Dave Peterson
Dim i As Long
Const firstrow As Long = 2
Const lastrow As Long = 18
Const cb_col As Long = 3 'column C
For i = firstrow To lastrow
With Cells(i, cb_col)
If Cells(i, 2).Value Like "*Pend*" Then
With
ActiveSheet.CheckBoxes.Add(.Left, .Top, .Width, .Height)
' .Name = "cb" & Format(i - 1, "000")
.Caption = ""
End With
End If
End With
Next i
End Sub
I've taken out a few bits I didn't need. What I find by right clicking
on a check box is that the "container" for the check box fills the
cell it is in and the check box is to the left. I was wondering if it
would be possible to programmatically reduce the size of the container
around the check box and make it flush right in the cell, oh, and one
other thing, can the container background be made white or opaque.
here to place some check boxes on a worksheet.
Sub InsertCheckBoxes()
'from Dave Peterson
Dim i As Long
Const firstrow As Long = 2
Const lastrow As Long = 18
Const cb_col As Long = 3 'column C
For i = firstrow To lastrow
With Cells(i, cb_col)
If Cells(i, 2).Value Like "*Pend*" Then
With
ActiveSheet.CheckBoxes.Add(.Left, .Top, .Width, .Height)
' .Name = "cb" & Format(i - 1, "000")
.Caption = ""
End With
End If
End With
Next i
End Sub
I've taken out a few bits I didn't need. What I find by right clicking
on a check box is that the "container" for the check box fills the
cell it is in and the check box is to the left. I was wondering if it
would be possible to programmatically reduce the size of the container
around the check box and make it flush right in the cell, oh, and one
other thing, can the container background be made white or opaque.