Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IF Function question

4 views
Skip to first unread message

nwhu...@gmail.com

unread,
Jan 23, 2008, 12:18:39 PM1/23/08
to
Hi,

I am using a worksheet with Checkboxes included. I need to create a
function that if the checkbox is checked, a value will show in another
cell. I can't figure out how to make the logical test relate to the
control/form checkbox. Is it possible to do this? Or do I need to
create a macro in VB to do this? Any ideas?

Thanks,
Carl

m00n

unread,
Jan 24, 2008, 10:56:53 PM1/24/08
to

<nwhu...@gmail.com> schreef in bericht
news:0ea340b1-1dbc-44f2...@c23g2000hsa.googlegroups.com...

Yes, you'll need Visual Basic.
When you click a CheckBox or any other control, it triggers an event.
Control events can not be handled in a worksheet, so it must be done with
VB, like this:


Private Sub CommandButton1_Click()
If CheckBox1.Value = True Then
Sheets("Sheet1").Range("A1") = "Checked!"
Else
Sheets("Sheet1").Range("A1") = "Unchecked!"
End If
End Sub


Mangesh

unread,
Feb 20, 2008, 9:11:38 AM2/20/08
to
Right click on the control (checkbox in your case). Go to properties.
Linked Cell. Mention some cell say A1. This cell is now linked to your
control. You can then use this cell for your logical tests. You don't
need an macro.
0 new messages