CHECKBOX HELP

L

lecoughlin

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top