conditional visibility of check box

E

Erol

Hi All,

I want to use check box from control toolbar. I want this check box to be
visible if there is a certain value in another cell. Is this possible somehow?

Thanks in advance,
 
J

Jim Thomlinson

As opposed to conditional visibility I prefer to use conditional enabling.
The box is there but can not be used until the cell is filled in. I get too
many calls from people saying it is broken because the check box was not
there... Tyr this

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Me.Range("A1"), Target) Is Nothing Then
If Target.Value <> "" Then
CheckBox1.Enabled = True
Else
CheckBox1.Enabled = False
End If
End If
End Sub

Paste this code into the sheet where the checkbox is.
 
E

Erol

That was awesome, thank you Jim.

I would appreciate if you can also show me how to make it visible and
invisible under a cell's condition.

Thank you
 
J

Jim Thomlinson

Replace Enable with Visible in the code that was posted...

CheckBox1.Visible= True or False...
 
E

Erol

This is magic.... thank you Jim

Erol said:
That was awesome, thank you Jim.

I would appreciate if you can also show me how to make it visible and
invisible under a cell's condition.

Thank you
 
E

Erol

Hi Jim... your previous replies helped greatly.... but I was trying the check
box clickable when A1 cell has the exact value of "2". Is this possible....

I substituted (<> "") with ( = 2) or even with ( = "2") but it
didn't work. The value 2 is an output of an option button.

I would appreciate the help.
 

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