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?
 

muckshifter

I'm not weird, I'm a limited edition.
Moderator
Joined
Mar 5, 2002
Messages
25,739
Reaction score
1,204
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:
 
Joined
Mar 12, 2009
Messages
2
Reaction score
0
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top