T
Todd
I have code like the following in a module and a Call
command linked to a command button on Sheet1 which is
named Index. Sheet 2 is named Form. When I check the
check box and press the command button only the cell range
defined is highlighted but does not change to yellow.
After going back the the Index sheet and pressing the
command button again will the cells then turn yellow.
What can I add so the cells will follow the complete code
on the first press of the command button. Thanks for the
help!
Public Sub AddingEquipment()
If Worksheets("Index").CheckBox1.Value = False Then Exit
Sub
Sheets("Form").Activate
ActiveSheet.Range("AddingEquipment").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
command linked to a command button on Sheet1 which is
named Index. Sheet 2 is named Form. When I check the
check box and press the command button only the cell range
defined is highlighted but does not change to yellow.
After going back the the Index sheet and pressing the
command button again will the cells then turn yellow.
What can I add so the cells will follow the complete code
on the first press of the command button. Thanks for the
help!
Public Sub AddingEquipment()
If Worksheets("Index").CheckBox1.Value = False Then Exit
Sub
Sheets("Form").Activate
ActiveSheet.Range("AddingEquipment").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