Macro question
I have a spreadsheet with simple check boxes.
I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
In the macro assigned to the one checkbox add
If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
Hello,
Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
What sort of checkbox is it?
Controls checkbox? Private Sub CheckBox1_Click() If Me.CheckBox1.Value Then Me.CheckBox2.Value = True End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
Hello,
Thanks for that - this works fine - I changed it a little but the idea is what is important - thanks What sort of checkbox is it? - It is a check box I drew in a form. Thanks "Bob Phillips" wrote: What sort of checkbox is it? Controls checkbox? Private Sub CheckBox1_Click() If Me.CheckBox1.Value Then Me.CheckBox2.Value = True End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
I answered my own question John, for confirmation. As it happens I got it
wrong <LOL. Originally I assumed it was a forms checkbox on a worksheet. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for that - this works fine - I changed it a little but the idea is what is important - thanks What sort of checkbox is it? - It is a check box I drew in a form. Thanks "Bob Phillips" wrote: What sort of checkbox is it? Controls checkbox? Private Sub CheckBox1_Click() If Me.CheckBox1.Value Then Me.CheckBox2.Value = True End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
Hello,
Thanks again - maybe you can answer one more thing for me that is driving me up the wall. I have the following Private Sub CheckBox3_Click() Rows("11:11").Select Selection.EntireRow.Hidden = True End Sub The only problem is that the row hides perfectly but the check box stays !! Do you know how to hide the check box as well? Thanks John "Bob Phillips" wrote: I answered my own question John, for confirmation. As it happens I got it wrong <LOL. Originally I assumed it was a forms checkbox on a worksheet. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for that - this works fine - I changed it a little but the idea is what is important - thanks What sort of checkbox is it? - It is a check box I drew in a form. Thanks "Bob Phillips" wrote: What sort of checkbox is it? Controls checkbox? Private Sub CheckBox1_Click() If Me.CheckBox1.Value Then Me.CheckBox2.Value = True End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
Macro question
Private Sub CheckBox3_Click()
Me.Rows(11).Hidden = True Me.CheckBox3.Visible = False End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks again - maybe you can answer one more thing for me that is driving me up the wall. I have the following Private Sub CheckBox3_Click() Rows("11:11").Select Selection.EntireRow.Hidden = True End Sub The only problem is that the row hides perfectly but the check box stays !! Do you know how to hide the check box as well? Thanks John "Bob Phillips" wrote: I answered my own question John, for confirmation. As it happens I got it wrong <LOL. Originally I assumed it was a forms checkbox on a worksheet. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for that - this works fine - I changed it a little but the idea is what is important - thanks What sort of checkbox is it? - It is a check box I drew in a form. Thanks "Bob Phillips" wrote: What sort of checkbox is it? Controls checkbox? Private Sub CheckBox1_Click() If Me.CheckBox1.Value Then Me.CheckBox2.Value = True End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... Hello, Thanks for your help but unfortunately it didn't help. I have used something similar to your solution before but dor a combo box and not a check box. Just for you to see the check box sub really is simple - I just have the following Private Sub CheckBox1_Click() End Sub Do you have any other suggestions? Thanks John "Bob Phillips" wrote: In the macro assigned to the one checkbox add If ActiveSheet.CheckBoxes("Check Box 1").Value = 1 Then ActiveSheet.CheckBoxes("Check Box 2").Value = True End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John" wrote in message ... I have a spreadsheet with simple check boxes. I want to check a check box and if checked another check box is automatically ticked. I have managed to get it to select another check box but not actually place a check inside the check box. Anyone got any ideas? Many thanks |
All times are GMT +1. The time now is 03:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com