Bob thank you. The one word 'controls' was the missing peice. This new code pasted below now works perfect:
Sub CheckBox359_Click()
i = 359
If Controls("CheckBox" & i) = True Then
Sheets("Order_Entry").Shapes("Rectangle " & i).Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 8
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
End If
If Controls("CheckBox" & i) = False Then
Sheets("Order_Entry").Shapes("Rectangle " & i).Select
Selection.ShapeRange.Fill.Visible = msoFalse
End If
End Sub
It is odd to me why i have to use:
If Controls("CheckBox" & i) = True Then
if I use the variable but:
if Checkbox359 = True Then
works fine if I don't use the variable. Looks like I have more learning to do.![]()
Thanks for your help,
Larry
Bookmarks