I am trying to test each character in Pi_Entered
to Pi, if wrong then highlight vbRed
and move the next character. I get TTFTTTTF instead of digits. Highlight in red incorrect digits of Pi in a string. not sure what I am doing wrong.
Sub Highlight_Error_Digits()
'
' After entering the digits, press the "Show Error Digits" highlighted in Red
'
Dim X, Pi_Str_Len As Integer
Dim Pi_String, Pi_Entrd_String As String
Pi_String = Range("$C$7")
Pi_Entrd_String = Range("$C$6")
Pi_Str_Len = Len(Pi_String)
'
Worksheets("Pi_Key'd_In").Activate
For X = 1 To Pi_Str_Len
If Mid(Pi_Entrd_String, X, 1) <> Mid(Pi_String, X, 1) Then
Worksheets("Pi_Key'd_In").Activate
Range("C9").Activate
ActiveCell.Characters(Start:=Mid(Pi_Entrd_String, X, 1), Length:=1).Font.Color = vbRed
Else
Worksheets("Pi_Key'd_In").Activate
Range("C9").Activate
ActiveCell.Characters(Start:=Mid(Pi_Entrd_String, X, 1), Length:=1).Font.Color = vbBlack
End If
Next X
Range("$C$9").Value = Pi_Entrd_String
End Sub