Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
I'm trying to automate a list so that when I select a control 'checkbox'
several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
Place in the code for the sheet or userform (wherever you have the checkboxes)
Private Sub SpaghettiCheckBox_Change() 'this is the master checkbox If SpaghettiCheckBox.value = true then ''these are ones that are changed when the master is checked PastaCheckBox.value = true SauceCheckBox.value = true ParmeseanCheckBox.value = true End if end sub You'll have to do this for all your checkboxes (make sure you change the names as well! I just went along with your grocery example) "FMW" wrote: I'm trying to automate a list so that when I select a control 'checkbox' several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
I must still be doing something wrong. I'm using a control form and using
checkboxes. In my VB form (this comes up automatically when I double click the control when in Design mode nothing is happening : Private Sub CheckBox2_Click() If CheckBox2.Value = True Then CheckBox1.Value = True End If End Sub Any suggestions? Sorry, I'm new to this coding stuff.... "JNW" wrote: Place in the code for the sheet or userform (wherever you have the checkboxes) Private Sub SpaghettiCheckBox_Change() 'this is the master checkbox If SpaghettiCheckBox.value = true then ''these are ones that are changed when the master is checked PastaCheckBox.value = true SauceCheckBox.value = true ParmeseanCheckBox.value = true End if end sub You'll have to do this for all your checkboxes (make sure you change the names as well! I just went along with your grocery example) "FMW" wrote: I'm trying to automate a list so that when I select a control 'checkbox' several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
Where are your checkboxes located? Are they on a Userform, or directly on
the sheet? And if directly on the sheet, are you using the control toolbox toolbar, or the forms toolbar? "FMW" wrote: I must still be doing something wrong. I'm using a control form and using checkboxes. In my VB form (this comes up automatically when I double click the control when in Design mode nothing is happening : Private Sub CheckBox2_Click() If CheckBox2.Value = True Then CheckBox1.Value = True End If End Sub Any suggestions? Sorry, I'm new to this coding stuff.... "JNW" wrote: Place in the code for the sheet or userform (wherever you have the checkboxes) Private Sub SpaghettiCheckBox_Change() 'this is the master checkbox If SpaghettiCheckBox.value = true then ''these are ones that are changed when the master is checked PastaCheckBox.value = true SauceCheckBox.value = true ParmeseanCheckBox.value = true End if end sub You'll have to do this for all your checkboxes (make sure you change the names as well! I just went along with your grocery example) "FMW" wrote: I'm trying to automate a list so that when I select a control 'checkbox' several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
The checkboxes are directly on the Excel sheet and I'm using a control
toolbox toolbar. FYI - I'm not sure what I did but the code appears to be working. In fact I added in a statement saying if 'false' then all 'false' to deselect. Thanks for your help! I'll let you know if I get stuck again. FYI - I am using this to automate our project teams. If a certain type of project is selected the developers eligible to work on that project are highlighted. "JNW" wrote: Where are your checkboxes located? Are they on a Userform, or directly on the sheet? And if directly on the sheet, are you using the control toolbox toolbar, or the forms toolbar? "FMW" wrote: I must still be doing something wrong. I'm using a control form and using checkboxes. In my VB form (this comes up automatically when I double click the control when in Design mode nothing is happening : Private Sub CheckBox2_Click() If CheckBox2.Value = True Then CheckBox1.Value = True End If End Sub Any suggestions? Sorry, I'm new to this coding stuff.... "JNW" wrote: Place in the code for the sheet or userform (wherever you have the checkboxes) Private Sub SpaghettiCheckBox_Change() 'this is the master checkbox If SpaghettiCheckBox.value = true then ''these are ones that are changed when the master is checked PastaCheckBox.value = true SauceCheckBox.value = true ParmeseanCheckBox.value = true End if end sub You'll have to do this for all your checkboxes (make sure you change the names as well! I just went along with your grocery example) "FMW" wrote: I'm trying to automate a list so that when I select a control 'checkbox' several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating a checklist
Glad I could help! Let me know if there is anything else you need.
"FMW" wrote: The checkboxes are directly on the Excel sheet and I'm using a control toolbox toolbar. FYI - I'm not sure what I did but the code appears to be working. In fact I added in a statement saying if 'false' then all 'false' to deselect. Thanks for your help! I'll let you know if I get stuck again. FYI - I am using this to automate our project teams. If a certain type of project is selected the developers eligible to work on that project are highlighted. "JNW" wrote: Where are your checkboxes located? Are they on a Userform, or directly on the sheet? And if directly on the sheet, are you using the control toolbox toolbar, or the forms toolbar? "FMW" wrote: I must still be doing something wrong. I'm using a control form and using checkboxes. In my VB form (this comes up automatically when I double click the control when in Design mode nothing is happening : Private Sub CheckBox2_Click() If CheckBox2.Value = True Then CheckBox1.Value = True End If End Sub Any suggestions? Sorry, I'm new to this coding stuff.... "JNW" wrote: Place in the code for the sheet or userform (wherever you have the checkboxes) Private Sub SpaghettiCheckBox_Change() 'this is the master checkbox If SpaghettiCheckBox.value = true then ''these are ones that are changed when the master is checked PastaCheckBox.value = true SauceCheckBox.value = true ParmeseanCheckBox.value = true End if end sub You'll have to do this for all your checkboxes (make sure you change the names as well! I just went along with your grocery example) "FMW" wrote: I'm trying to automate a list so that when I select a control 'checkbox' several sub-boxes will be selecting. The best way I can think of to describe the functionality I'm after is to think of a grocery list. If my menu item is on top of the list (spaghetti, chicken dinner, etc) and I check it all of the ingredients boxes in the shopping list will automatically be selected. Can excel help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
rooms checklist | Excel Worksheet Functions | |||
Checklist | Excel Worksheet Functions | |||
Checklist | New Users to Excel | |||
RFP Checklist template | Excel Discussion (Misc queries) | |||
Checklist | Excel Programming |