I am working on an analysis template with a UserForm.
I have macros associated with checkboxes. I want to activate them by clicking the separate analysis command box. The macros are called: graph_dur, graph_ram, dur_calc, ram_calc.
The UserForm allows users to check off the analyses they want, then run calculations with an "Analysis" command button.
Any boxes that are not checked should not run their macros when "Analyze" is clicked.
I understand that when a checkbox is "checked" then it returns "True".
I don't know how to associate the True return with the run of a macro when "Analyze" is activated.
This code is not correct, but attempts to highlight my basic layout.
Private Sub CheckBox1_Click()
If CheckBox1 = True
Then Call.Graph_duration
Else CheckBox1 = False
End If
End Sub
Private Sub CheckBox2_Click()
If CheckBox2 = True
Then Call.Graph_ram
Else CheckBox2 = False
End If
End Sub