how can I find everything to the right of THE LAST ":" in a string??
i.e.
yo:blah:what:why
get "why" even if you dont know what is to the right or left of the ":"s...
thanks
Printable View
how can I find everything to the right of THE LAST ":" in a string??
i.e.
yo:blah:what:why
get "why" even if you dont know what is to the right or left of the ":"s...
thanks
try this
Code:Dim i As Integer
Dim MyStr As String
Dim MyNewStr As String
MyStr = "This Message:Message 2:Hello"
i = InStrRev(MyStr, ":") + 1
MyNewStr = Mid(MyStr, i)
MsgBox MyNewStr