Log in

View Full Version : Text delection


Ache
Feb 21, 2008, 08:36 AM
How do I write a code vb code that could function like a backspace key. That is delect text from right to left one after the other?

kabia
Feb 22, 2008, 04:10 PM
try..

Text1.text = mid(text1.text,1,len(text1.text -1))

Ache
Feb 23, 2008, 02:33 AM
reference to this question asked on 22/02/08 one member suggested that I use this : text1.text=mid(text1.text,1,len(text1.text-1)). I tried it to achieve backspace but the I got this error message: variable required - can't assign to this expression. And "-" was highlighted. What do I do now.

kabia
Feb 23, 2008, 04:03 AM
Sorry typed incorrect...

Text1.text = mid(text1.text,1,len(text1.text) -1)

melondotnet
Mar 13, 2008, 03:09 PM
In vb.net (2005)

StringVar1.Remove(StringVar1.length,1)

This may require revising...

balraviaggarwal
Apr 24, 2008, 06:58 PM
How I can make text box which allow a data operator to input amount only.

balraviaggarwal
Apr 24, 2008, 07:03 PM
Please give me code or mathod to restrict a data operator other then Amount means I want to creat a Amout Box.

melondotnet
Apr 28, 2008, 11:59 AM
Please explain more fully... :confused:

Do you want it so that the user can enter the number of 'Backspaces' to 'Execute'?