Hi all,
I am sure this is an easy one, but I think the seasonal effects of Muld Wine are getting to me.
I am trying to join / concatenate the output of the for loop.
Here is my code:
I want it to return "John Smith Went Shopping" but it only returns "Shopping Shopping"
I am sure I have done this several time before, but I just can't work it out at the moment :-(.
Many thanks
Tex
I am sure this is an easy one, but I think the seasonal effects of Muld Wine are getting to me.
I am trying to join / concatenate the output of the for loop.
Here is my code:
Code:
wscript.Echo sCase("john smith went shopping")
Function sCase(strSentence)
aSentence = Split(strSentence," ")
For Each word In aSentence
intWord = Len(word)
strFirstLetter = UCase(Left(word, 1))
strRemainingLetters = LCase(Right(word, intWord - 1))
strWord = strFirstLetter & strRemainingLetters
Next
strWord1 = strWord & " " & strWord
sCase = strword1
End Function
I want it to return "John Smith Went Shopping" but it only returns "Shopping Shopping"
I am sure I have done this several time before, but I just can't work it out at the moment :-(.
Many thanks
Tex