X = 0
inString = "Good Morning Everybody"
inStringArr = Split(inString)
inStringArrLen = UBound(inStringArr)
ReDim strArr(inStringArrLen)
For i = 0 To Len(inString)
aChar = Mid(inString, i + 1, 1)
If aChar = " " Or i = Len(inString) Then
strArr(X) = tempStr + " "
tempStr = Empty
X = X + 1
Else
tempStr = tempStr + aChar
End If
Next
ReDim revArr(inStringArrLen)
i = 0
For j = UBound(strArr) To 0 Step -1
revArr(i) = strArr(j)
i = i + 1
Next
MsgBox Join(revArr)
No comments:
Post a Comment