Hi Everyone.
I have a problem with my Project.
I have 2 textbox.
In the first one is possible to write a string of maximum 255 characters.
I want that when I arrive at the 255nd char, it's impossible to write anymore.
In the second I want that we have a "countdown" of possible writable character. The start it will be 255 till 0...
I tried with all the properties of textbox but I don't have a "dinamic countdown"...
Do you have any suggestions?
thx in advance, greetings.
ps: i post the code I use to "block" the first textbox...
Private Sub txtCommento_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo ErrHandle
Select Case KeyCode
Case 8, 46
Case Else
If Len(Me.txtCommento.Text) > txtCommento.Tag - 1 Then KeyCode = 0
End Select
ErrHandle:
If Err.Number = 0 Then Exit Sub
MsgBox "Errore numero: " & Err.Number & " Descrizione: " & Err.Description & " Sorgente: " & Err.Source & " Evento: CAP_KeyDown "
End Sub
I have a problem with my Project.
I have 2 textbox.
In the first one is possible to write a string of maximum 255 characters.
I want that when I arrive at the 255nd char, it's impossible to write anymore.
In the second I want that we have a "countdown" of possible writable character. The start it will be 255 till 0...
I tried with all the properties of textbox but I don't have a "dinamic countdown"...
Do you have any suggestions?
thx in advance, greetings.
ps: i post the code I use to "block" the first textbox...
Private Sub txtCommento_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo ErrHandle
Select Case KeyCode
Case 8, 46
Case Else
If Len(Me.txtCommento.Text) > txtCommento.Tag - 1 Then KeyCode = 0
End Select
ErrHandle:
If Err.Number = 0 Then Exit Sub
MsgBox "Errore numero: " & Err.Number & " Descrizione: " & Err.Description & " Sorgente: " & Err.Source & " Evento: CAP_KeyDown "
End Sub