09-03-2015, 09:42 AM
here is the updated code.
Note:- I have done it based on the pure requirement in this query. Ideally we have to check if the value is an alphabet and then change the case.
Code:
input = "abhijit abhijit"
charCounter = 1
For i = 1 To len(input) Step 1
char = Mid(input,i,1)
If char <> " " Then
If charCounter mod 2 = 0 Then
outPut = output & Ucase(char)
Else
outPut = output & lcase(char)
End If
charCounter = charCounter + 1
else
output = output & char
End If
Next
msgbox output
Thanks,
SUpputuri
SUpputuri