ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OnChange event attached to tick box (https://www.excelbanter.com/excel-programming/411081-onchange-event-attached-tick-box.html)

[email protected]

OnChange event attached to tick box
 
Arrgh please help

I have a spreadsheet that has two tick boxes. The second tick box
mustnt show until the first has been ticked. How do I do it.

Many thanks in desperation


Norman Jones[_2_]

OnChange event attached to tick box
 
Hi Jowashy.

Try:

'=========
Private Sub CheckBox1_Click()
With Me
.CheckBox2.Visible = _
.CheckBox1.Value = True
End With
End Sub
'<<=========


This is event code and should be pasted
into the worksheets's code module (not a
standard module and not the workbook's
ThisWorkbook module):

Right-click the worksheet's tab |
Select 'View Code' from the menu
Paste the code
Alt-F11 to return to Excel.


---
Regards.
Norman

FSt1

OnChange event attached to tick box
 
hi
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox2.Visible = True
Else
CheckBox2.Visible = False
End If
End Sub

regards
FSt1


" wrote:

Arrgh please help

I have a spreadsheet that has two tick boxes. The second tick box
mustnt show until the first has been ticked. How do I do it.

Many thanks in desperation



[email protected]

OnChange event attached to tick box
 
On May 16, 11:19 pm, "Norman Jones"
wrote:
Hi Jowashy.

Try:

'=========
Private Sub CheckBox1_Click()
With Me
.CheckBox2.Visible = _
.CheckBox1.Value = True
End With
End Sub
'<<=========

This is event code and should be pasted
into the worksheets's code module (not a
standard module and not the workbook's
ThisWorkbook module):

Right-click the worksheet's tab |
Select 'View Code' from the menu
Paste the code
Alt-F11 to return to Excel.

---
Regards.
Norman


Fantastic. Ill try it immediately. Thanks

Britney

OnChange event attached to tick box
 
Hi Norman
I send you an email as I have the same problem as Jowashy. I tried your code
but it didn't work. Is there any other way to solve this problem

thanks
Britney

"Norman Jones" wrote:

Hi Jowashy.

Try:

'=========
Private Sub CheckBox1_Click()
With Me
.CheckBox2.Visible = _
.CheckBox1.Value = True
End With
End Sub
'<<=========


This is event code and should be pasted
into the worksheets's code module (not a
standard module and not the workbook's
ThisWorkbook module):

Right-click the worksheet's tab |
Select 'View Code' from the menu
Paste the code
Alt-F11 to return to Excel.


---
Regards.
Norman



All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com