View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Check box not working out for me.. why?

You can use code directly associated with the checkbox.

I'm assuming that your checkbox is from the Control toolbox toolbar. If it's
not, then replace it with one that is from that toolbar.

My checkbox was named Checkbox1:

Option Explicit
Private Sub CheckBox1_Click()
Me.Rows("5:56").Hidden = Not (Me.CheckBox1.Value)
End Sub

This code goes in the module for the worksheet that owns the checkbox (and rows
to hide).



TG wrote:

Hi,

I am using a check box and sending the true or false value to another
spreadsheet (at cell A2), I am then using the following code:

If Target.Address = "$A$2" Then
If UCase(Target.Value) = "FALSE" Then
Rows("5:56").Hidden = True
Else
Rows("5:56").Hidden = False
End If
End If

this code does not work using the check box to send a true or false value,
it does however work when I manually type in false or true.....???

Can any one help me with this one?

Thank you guys in advance,

TG


--

Dave Peterson