28.09.2022, 12:06
Code:
Dim rngDV As Range
Dim wert_old As String
Dim wertnew As String
On Error GoTo Errorhandling
If Not Application.Intersect(Target, Range("B16:B1000")) Is Nothing Then
Set rngDV = Target.SpecialCells(xlCellTypeAllValidation)
If rngDV Is Nothing Then GoTo Errorhandling
If Not Application.Intersect(Target, rngDV) Is Nothing Then
Application.EnableEvents = False
wertnew = Target.Value
Application.Undo
wertold = Target.Value
Target.Value = wertnew
If wertold <> "" Then
If wertnew <> "" Then
Target.Value = wertold & ", " & wertnew
End If
End If
End If
Application.EnableEvents = True
End If
Errorhandling:
Application.EnableEvents = True
Ich kopiere jeweils nur die Codes und kann diese meist leider nicht mehr gross weiter anpassen, da mir das Wissen dazu fehlt.
Auf jeden Fall möchte ich die Mehrfachauswahl nicht nur für den Bereich B16:B1000, sondern auch für E16:E1000 und G16:G1000 anwenden.
Wie passe ich den Code oben an?
Herzlichen Dank für eure Hilfe und liebe Grüsse
mauritius 5