Gruppe
Ereignis
Problem
Wie kann ich verhindern, dass mehr als 255 Zeichen in eine Zelle eingegeben werden?
ClassModule: Tabelle1
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sTxt As String
sTxt = Target.Value
Application.EnableEvents = False
On Error GoTo ERRORHANDLER
If Len(sTxt) > 255 Then
Target.Value = Left(sTxt, 255)
End If
ERRORHANDLER:
Application.EnableEvents = True
End Sub