Hi All

I have a procedure that adds a line to a text box once a certain task is completed.

It is as follows
Code:
Private Sub WriteLog(ByVal sInfo As String, Optional AddDate As Integer, Optional iInfoType As Integer)
    If AddDate = 1 Then
        Me.txtProg = Me.txtProg & sInfo & vbCrLf
    Else
        Select Case iInfoType
            Case 0
                If Me.txtProg = "" Then
                    Me.txtProg = Date & Space(1) & Time & ": " & sInfo & vbCrLf
                Else
                    Me.txtProg = Me.txtProg & Date & Space(1) & Time & ": " & sInfo & vbCrLf
                End If
            Case 1
                If Me.txtProg = "" Then
                    Me.txtProg = Date & Space(1) & Time & ": " & sInfo & vbCrLf
                Else
                    Me.txtProg = Me.txtProg & Date & Space(1) & Time & ": " & sInfo & vbCrLf
                End If
        End Select
    End If
    Me.txtProg.SelStart = Len(Me.txtProg)
    DoEvents
End Sub
If the iInfoType is equal to 1 this is because the the log info is an error

I want to be able to write the log text with iInfoType 0 to be blue and the log text with iInfoType 1 to be red.

Can you help?