theinviter
Registered User.
- Local time
- Today, 14:43
- Joined
- Aug 14, 2014
- Messages
- 251
Dears
kind support for below code, as i do not want to show the message.
how can modify it.
On Error GoTo Err_LimitChange
' Purpose: Limit the text in an unbound text box/combo.
' Usage: In the control's Change event procedure:
' Call LimitChange(Me.MyTextBox, 12)
' Note: Requires LimitKeyPress() in control's KeyPress event also.
If Len(ctl.Text) > iMaxLen Then
MsgBox "Truncated to " & iMaxLen & " characters.", vbExclamation, "Too long"
ctl.Text = Left(ctl.Text, iMaxLen)
ctl.Scan = iMaxLen
End If
Exit_LimitChange:
Exit Sub
Err_LimitChange:
'MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Exit_LimitChange
thanks
kind support for below code, as i do not want to show the message.
how can modify it.
On Error GoTo Err_LimitChange
' Purpose: Limit the text in an unbound text box/combo.
' Usage: In the control's Change event procedure:
' Call LimitChange(Me.MyTextBox, 12)
' Note: Requires LimitKeyPress() in control's KeyPress event also.
If Len(ctl.Text) > iMaxLen Then
MsgBox "Truncated to " & iMaxLen & " characters.", vbExclamation, "Too long"
ctl.Text = Left(ctl.Text, iMaxLen)
ctl.Scan = iMaxLen
End If
Exit_LimitChange:
Exit Sub
Err_LimitChange:
'MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Exit_LimitChange
thanks