Ultimately you can only run one macro from a check box. That being said the
macro can decide which code to run based on the value of the checkbox. Now
the question is what type of checkbox do you have on your sheet. If the
checkbox came from the forms toolbar then when you right click the check box
one of the options will be assign macro. If it came from the Control Toolbox
then it will not have assign macro. The code will depend on the type of
checkbox. Reply back and we can supply you with the appropriate code. Also
supply the names of the 2 different macros that you have and which one should
run based on the check mark...
I put a checkbox from the Forms toolbar on the worksheet. I assigned that
checkbox the first macro:
Option Explicit
Sub RunTheMacros()
Dim CBX As CheckBox
Set CBX = ActiveSheet.CheckBoxes(Application.Caller)
If CBX.Value = xlOn Then
Call ItsCheckedMacro
Else
Call ItsNotCheckedMacro
End If
End Sub
Sub ItsCheckedMacro()
MsgBox "Checked"
End Sub
Sub ItsNotCheckedMacro()
MsgBox "Not checked"
End Sub
Thanks Jim...I ended up piecing a few comments together and came up with
this...
Private Sub CheckBox1_Click()
If CheckBox1 Then
Application.AutoCorrect.AddReplacement What:=".", Replacement:=":"
Else
Application.AutoCorrect.DeleteReplacement What:="."
End If
End Sub