Windows XP Type Mismatch Puzzle

Joined
Mar 12, 2009
Messages
2
Reaction score
0
Hello,
I am frustratingly getting a "Type Mismatch" error on this bit of code:

Public Sub ReLockAll(user As String)
If shtFCED.Visible = True Then
shtFCED.Unprotect
shtFCED.Select
Range("A4:AT110").Select
Selection.Font.ColorIndex = 0 '<<<---ERROR HERE "Type Mismatch Error"
Selection.Font.Bold = False
Selection.Locked = True
shtFCED.Protect
shtFCED.Visible = False
End If

End Sub

Any ideas?
 
welcome to PCR

as far as I know, which isn't a lot, there is no color-index 0 ... try 1 for black, or, 3 for red.


:user:
 
0 = Automatic. the problem doesn't change if I change the order of the ColorIndex and Bold lines. If i do that, then it just highlights the Bold line instead.
 
Back
Top