View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default Find a string with a text paragraph


If Not IsError(Application.Match(Me.TextBox1.Text,
Sheets("Data").range(B3:B40") , 0) ) Then

MsgBox "Don't be obscene"
Me.TextBox1.Text = ""
End If

--

HTH

Bob

"leerem" wrote in message
...
Gents, I need your expertise once again,

I have a fault log (userform) which has a text box placed on it, for
information regarding the fault on hand. However I want to ensure that
this
text box isn't used for vulgar words etc.
I have a list of such words held on Sheets("Data").range(B3:B40") and wish
to check this list against the text within the text box.

How do i go about writing a function, that will be able to do such a task.

your assistance would be most appreciated

regards

Lee