Hi All,
I would like to select two checkboxes and run a macro, e.g. I have two checkboxes 1 call ChkBoxCarrA & a 2nd called ChkBoxCarrB. If I only select ChkBoxCarrA it calls a macro to produce a graph, If I only select ChkBoxCarrB it calls a different macro to produce a graph.
I want to be able to select both ChkBoxCarrA & ChkBoxCarrB to call a macro to display both graphs at the same time. It works ok as long as there is only 1 Checkbox selected. But not when I have both Checkboxes selected.
I tried to do this using the following code
But when it tries to run the line below when both Checkboxes are selected
it sees the ChkBoxCarrA and runs it's macro then finishes and doesn't see the rest of the statement.
Any help is greatly appreciated,
Will
I would like to select two checkboxes and run a macro, e.g. I have two checkboxes 1 call ChkBoxCarrA & a 2nd called ChkBoxCarrB. If I only select ChkBoxCarrA it calls a macro to produce a graph, If I only select ChkBoxCarrB it calls a different macro to produce a graph.
I want to be able to select both ChkBoxCarrA & ChkBoxCarrB to call a macro to display both graphs at the same time. It works ok as long as there is only 1 Checkbox selected. But not when I have both Checkboxes selected.
I tried to do this using the following code
Code:
Private Sub CmdDisplayGraph_Click()
'LA5
If OptGrapLa5.Value = "True" And ChkBoxCarrA.Value = "True" Then
Call LA5Backlash.LA5lashA
ElseIf OptGrapLa5.Value = "True" And ChkBoxCarrB.Value = "True" Then
Call LA5Backlash.LA5lashB
ElseIf OptGrapLa5.Value = "True" And ChkBoxCarrA.Value = "True" And ChkBoxCarrB.Value = "True" Then
Call LA5Backlash.LA5lashAB
End If
End Sub
But when it tries to run the line below when both Checkboxes are selected
Code:
ElseIf OptGrapLa5.Value = "True" And ChkBoxCarrA.Value = "True" And ChkBoxCarrB.Value = "True" Then
Call LA5Backlash.LA5lashAB
it sees the ChkBoxCarrA and runs it's macro then finishes and doesn't see the rest of the statement.
Any help is greatly appreciated,
Will