在VBA中提取string的最后两个单词
我试图提取vba中string的最后两个单词。
谁能帮我一个吗?
万分感谢!
考虑:
Sub LastTwoWords() Dim s As String s = "Now is the time for all good men to come to the aid of the party" ary = Split(s, " ") MsgBox ary(UBound(ary) - 1) MsgBox ary(UBound(ary)) End Sub