i'm stuck :(
i can't seem to make a code to remove a word, and everything after it. the word will always be "status"
how can i remove that and everything after it, but keep everything before it?
thank you
Printable View
i'm stuck :(
i can't seem to make a code to remove a word, and everything after it. the word will always be "status"
how can i remove that and everything after it, but keep everything before it?
thank you
VB Code:
Dim strWord As String Dim pos As Long strWord = "this is a status check" pos = InStr(1, strWord, "status", vbTextCompare) If pos > 0 Then strWord = Left$(strWord, pos - 1) End If Debug.Print strWord
thanks!
i'm not good with this kind of stuff yet :)
What about
VB Code:
TextBox1.Text = Replace(TextBox1.Text, "status", "")
(Assuming same case)
Aah never mind, I didn't read the post correctly.
Leave me alone. :mad: