Cechboxes are not part of cells. They sit onto of cells like pictures. try
soething like this
Sub Macro1()
'
' Macro1 Macro
'
'
For Each Shape In ActiveSheet.Shapes
If Left(Shape.Name, 8) = "CheckBox" Then
MsgBox (Shape.Name)
End If
Next Shape
End Sub
"(E-Mail Removed)" wrote:
> I have a document with a series of checkboxes, checkbox1-20.
>
> I am trying to write code that will go through these checkboxes, and
> if they are checked, output a "1" to another file. Can anyone help me
> write this code? I tried:
>
> If checkbox1.Checked = true Then
> Workbooks("wb1").Worksheets("data").cells(1,1) = 1
>
> This doesn't appear to be working.
>
> Thanks.
>
>
|