how do u convert inputbox's input to lower case?
Gorf
Printable View
how do u convert inputbox's input to lower case?
Gorf
x = LCase(InputBox(...))
Someone wanted to do this a while ago. Putting fox's code in the change function would reverse the string so you should use the string reversal function as well.
Also have a look at the strconv function.
What???Quote:
Putting fox's code in the change function would reverse the string.
Agreed Fox...
Sas, WHAT? =)
Z.
So I am told!
From reading other's posts, I have gathered that (because this exact Q was asked a while ago) doing this will reset the cursor to the front of the textbox, so that it appears to be reversing...
And Fox and Zaei...
DONT DO THAT
Please
Yes, it does stick the cursor at the fron of the box, but thats not even close to reversing =). Besides, ALL textbox assignments do that.
Z.
Just set the SelStart property to the len() if the text to put it on the end again...
Or you could do something like:
...but thats a bit dumb, no? =).Code:Dim x As String
Dim i As Long
Me.Show
x = LCase(InputBox(""))
For i = 1 To Len(x)
SendKeys Mid(x, i, 1)
Next i
Z.
Look Zaei, it's not for a TEXT BOX, but for an INPUT BOX :p:rolleyes: