How do I find last occurence of a character in a text string in Ex
as well as the two responses already received, you could also use the SPLIT
function
This is particularly useful if you want to see how many items are in the text
eg
Option Explicit
Sub SplitDemo()
Dim text As String
Dim var As Variant
text = "There are four words"
var = Split(text, " ")
MsgBox "text has " & UBound(var, 1) + 1 & " items"
Dim index As Long
index = UBound(var, 1)
MsgBox "The #" & index & " item =" & var(index)
End Sub
"jten" wrote:
I am looking for the last occurrence of a blank in a text string so that I
can parse the string
|