I am trying to change this 2 column 8 row selected cells from blue to red,but it doesn't work.
what is wrong ?
Code:
no reason Code:
- Private Sub Command2_Click()
- Dim Hits As Integer
- Dim i As Integer
- Hits = 7
- On Error Resume Next 'surpress error if blank cell
- For i = 1 To flexStatus.Rows - 1
- If flexStatus.TextMatrix(i, 0) = Hits Then
- MsgBox "you won hits " & Hits & " amount " & flexStatus.TextMatrix(i, 1)
- flexStatus.Row = i
- flexStatus.Col = 0
- flexStatus.ForeColor = vbRed
- flexStatus.Row = i
- flexStatus.Col = 1
- flexStatus.ForeColor = vbRed
- Exit Sub
- End If
- Next