Attribute VB_Name = "modBobba"
Public Function Filter(strInput) As String
Dim i As Long

Swearword = Split(frmMain.FILT.Text, Chr(1))(1)
Swearword = Split(Swearword, vbCrLf)
For i = 0 To UBound(Swearword)
If Swearword(i) <> "" Then
strInput = Replace(strInput, Swearword(i), Split(frmMain.FILT.Text, Chr(1))(0), 1, -1, vbTextCompare)
End If
Next i

Filter = strInput
End Function

Public Function CheckBadWords(strInput) As String

Result = 0
Swearword = Split(frmMain.FILT.Text, Chr(1))(1)
Swearword = Split(Swearword, vbCrLf)
For i = 0 To UBound(Swearword)
If Swearword(i) <> "" Then
    If InStr(strInput, Swearword(i)) <> 0 Then
        Result = 1
        Exit For
    End If
End If
DoEvents
Next i
CheckBadWords = Result
End Function
