|
-
November 25th, 2006, 02:28 AM
#1
Text Box Control
Hi. Lets say i have a textbox with the string "This is a text box" entered into it. What code can i use to read the first letter or character in the text box (in this example, "T") and then delete the first letter, leaving "his is a text box"?
-
November 25th, 2006, 02:42 AM
#2
Re: Text Box Control
Code:
left(text1.text,1) 'Show "T"
right(text1.text,len(text1.text)-1) ' Show text without first "T"
-
November 25th, 2006, 05:19 AM
#3
Re: Text Box Control
for deleting the first character, you could also use Mid$:
Code:
Text1.Text = Mid$(Text1.Text1, 2)
-
November 25th, 2006, 05:24 AM
#4
Re: Text Box Control
Even shorter, use Mid$ to remove the first character
Code:
Text1 = Mid$(Text1, 2)
I also prefer to be strict and use Left$, Mid$, Right$ etc which enforce variable type. Without the dollar sign they return variants.
Edit - Snap, Bushmobile!
(\/)
(-.-)
(')(')
Bunny's quest for world domination continues.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|