I am looking for a good Character count Algorithm for Textbox. ie I have a textbox that I can only allow 200 Characters in it. I want to coun't down from 200 when someone types in the textbox. When they use Delete or Backspace and other char's that don't add to the textbox like the arrow keys and function keys I don't want the counter label to count them. I can create one but I was hoping someone would have it done. Yes I guess I am being lazy but I have very little time to get this project done for work and there are alot of other things I need to do. WA!@Wa! Wa! Sorry for the wine. If anyone can help I would appreciate it. Here is code I have now this may help you understand what I am doing. I set the label LblTotNumchr=200 on form load. As you see the code does not take into account the other keys that are not numbers or letters or spaces. It counts everything!
If KeyCode = vbKeyBack Then
Counter = LblTotNumchr.Caption + 1
LblTotNumchr.Caption = Counter
Exit Sub
End If
Counter = LblTotNumchr.Caption
Counter = Counter - 1
LblTotNumchr.Caption = Counter
LblTotNumchr.Refresh
Thanks Troy
[Edited by Troy Mac on 10-16-2000 at 03:03 PM]
