PC Review


Reply
Thread Tools Rate Thread

CHECKBOX HELP

 
 
lecoughlin@gmail.com
Guest
Posts: n/a
 
      30th May 2007
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      30th May 2007
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.
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox Control - How to display a true or false value in the cellcontaining a checkbox Dave K Microsoft Excel Discussion 1 8th Sep 2010 08:31 PM
Count of records where checkbox 1 is unchecked, checkbox 2 is chec EllenM Microsoft Access Reports 1 24th Mar 2010 03:23 PM
Coordinate status of checkbox on form to checkbox on multiple reco DanRoy Microsoft Access 0 4th Sep 2008 09:18 PM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= Microsoft ASP .NET 1 6th Oct 2006 05:11 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:08 PM.