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!

Removing Letters from Textbox

Status
Not open for further replies.

lcfc

Programmer
Dec 4, 2001
27
GB
Hi, i know this is in the wrong forum, but there doesn't seem to be an embedded visual basic forum. I have created a virtual keypad. In VB6 the code for the backspace button works - Text1.Text = Left$(Text1.Text, Len(Text1.Text) - 1). When i transfer this to Embedded VB3, it will not allow the '$' character. If you remove this in VB6, the code still works, but when transfered to Embedded VB3 it says "object not a collection". This is driving me crazy, can anyone tell me how to do this?
 
Try using
text1.text = mid(text1.text,1,len(text1.text)-1)

This may work

This function goes from the indicated starting position for the indicated number of characters.

Mid(object,start,[length])

Brian Coats
 
actually that is

Mid(string,start,[length])

and this is useful for getting the middle part of any string or the last part... If length is greater than the number of characters from start to the end of the string then it just gets the rest of the string.

I hope this helps.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top