Is there a way to control the value of multiple checkboxes simultaneously?
I have searched internet for sample code, but found none that worked. I
have the code below but very slow and I imagine can be done simpler.
Is there a way to create an array of checkboxes? Could you suggest things
I can try?
Also, how do I 'upgrade' Excel spreadsheet with Macro 4.0 to Excel 2000?
I removed all the shapes/controls, changed some code, but still have
Macro 4.0 signature somewhere. What are the things I need to look out for?
MPCheckBox1 to 9 are checkboxes with no caption in Excel.
Private Sub ToggleAllPeriods_Click()
Dim toggle As Boolean
toggle = MPCheckBox1.Value
toggle = Not toggle
MPCheckBox1.Value = toggle
MPCheckBox2.Value = toggle
MPCheckBox3.Value = toggle
MPCheckBox4.Value = toggle
MPCheckBox5.Value = toggle
MPCheckBox6.Value = toggle
MPCheckBox7.Value = toggle
MPCheckBox8.Value = toggle
MPCheckBox9.Value = toggle
End Sub
I have searched internet for sample code, but found none that worked. I
have the code below but very slow and I imagine can be done simpler.
Is there a way to create an array of checkboxes? Could you suggest things
I can try?
Also, how do I 'upgrade' Excel spreadsheet with Macro 4.0 to Excel 2000?
I removed all the shapes/controls, changed some code, but still have
Macro 4.0 signature somewhere. What are the things I need to look out for?
MPCheckBox1 to 9 are checkboxes with no caption in Excel.
Private Sub ToggleAllPeriods_Click()
Dim toggle As Boolean
toggle = MPCheckBox1.Value
toggle = Not toggle
MPCheckBox1.Value = toggle
MPCheckBox2.Value = toggle
MPCheckBox3.Value = toggle
MPCheckBox4.Value = toggle
MPCheckBox5.Value = toggle
MPCheckBox6.Value = toggle
MPCheckBox7.Value = toggle
MPCheckBox8.Value = toggle
MPCheckBox9.Value = toggle
End Sub