Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete last character in a Textbox.

Status
Not open for further replies.

joelxez

Programmer
Apr 18, 2002
67
PH
dear experts,

Is thier anybody know how to delete last character in a textbox..
ex:

hello



hell

Joel,

 
you want to remove last character from text box
you can perform event aither any button click or lost focus and you can write code like the foll.

1. get the text from the text box in a string.
2. get text exluding last character from this by using left aur mid function.
3. replace text box's text with this string


 
Hi,
Try the following:

Text1=Left(Text1,Len(Text1)-1) Hope it helps. Let me know what happens.
With regards,
PGK
 
Hi PGK,

Great, thank you for your very simple solution..

Joel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top