T
Todd
Private Sub CommandButton1_Click()
Call CheckBox2_Click
End Sub
I have code like the following and it works almost like I
want it to, but when I check the checkbox it will activate
the Form worksheet I have. I do not want anything to
happen until after the command button is pressed. What
can I add or remove to this code to allow this to happen?
Thanks!
Option Explicit
Private Sub CommandButton1_Click()
Call CheckBox2_Click
End Sub
Private Sub CheckBox2_Click()
Sheets("Form").Activate
ActiveSheet.Range("Address").Select
If Selection.Interior.Pattern = xlNone Then
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Else
With Selection.Interior
.Pattern = xlNone
End With
End If
End Sub
Call CheckBox2_Click
End Sub
I have code like the following and it works almost like I
want it to, but when I check the checkbox it will activate
the Form worksheet I have. I do not want anything to
happen until after the command button is pressed. What
can I add or remove to this code to allow this to happen?
Thanks!
Option Explicit
Private Sub CommandButton1_Click()
Call CheckBox2_Click
End Sub
Private Sub CheckBox2_Click()
Sheets("Form").Activate
ActiveSheet.Range("Address").Select
If Selection.Interior.Pattern = xlNone Then
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Else
With Selection.Interior
.Pattern = xlNone
End With
End If
End Sub