AW: Textbox Inhalte prüfen
24.09.2009 10:28:27
Gerd
Hallo Tino,
da fehlt noch etwas.
Hallo Urmila,
vor TextBox1 ggf. noch den Container schreiben,
UserForm1.TextBox1.Text oder Worksheets("Tabelle1").TextBox1.Text
u. den Call - Aufruf dort einbinden, wo du ihn benötigst.
Sub Teststart()
Call Meldung(TextBox1.Text, Array("gelb", "Januar", "Sommer"))
End Sub
Sub Meldung(strObjektText As String, vntSuchbegriffe As Variant)
Dim strCheck As String, intZ As Integer
For intZ = 0 To UBound(vntSuchbegriffe)
strCheck = strCheck & IIf(InStr(1, LCase(strObjektText), LCase(vntSuchbegriffe(intZ))) > 0, _
vbLf & vntSuchbegriffe(intZ), "")
Next
If Len(strCheck) > 0 Then MsgBox strCheck, , "Gefunden!"
End Sub
Gruß Gerd