ich habe einen Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim OutPut As Integer
If Target.Column = 8 Then
ThisRow = Target.Row
If Target.Value = "DV" Then
OutPut = MsgBox("For unsymmetrical double-welded joints: please combine 2 _
times of the corresponding single-weld joints with s/2", vbInformation, "unsymmetrical double-welded joints")
ElseIf Target.Value = "DY" Then
OutPut = MsgBox("For unsymmetrical double-welded joints: please combine 2 _
times of the corresponding single-weld joints with s/2", vbInformation, "unsymmetrical double-welded joints")
ElseIf Target.Value = "DHV" Then
OutPut = MsgBox("For unsymmetrical double-welded joints: please combine 2 _
times of the corresponding single-weld joints with s/2", vbInformation, "unsymmetrical double-welded joints")
ElseIf Target.Value = "DHY" Then
OutPut = MsgBox("For unsymmetrical double-welded joints: please combine 2 _
times of the corresponding single-weld joints with s/2", vbInformation, "unsymmetrical double-welded joints")
ElseIf Target.Value = "DU" Then
OutPut = MsgBox("For unsymmetrical double-welded joints: please combine 2 _
times of the corresponding single-weld joints with s/2", vbInformation, "unsymmetrical double-welded joints")
Else
Exit Sub
End If
End If
Columns("A:M").EntireColumn.AutoFit
Columns("AN:AP").EntireColumn.AutoFit
End Sub
Hier wird immer geprüft, ob sich eben die entsprechenden Values befinden und wenn ja, kommt eine Messagebox. Mein Problem: Wenn ich jetzt hunderte von Werten in die Spalte einfügen möchte, dann bekomme ich den Fehler: Laufzeitfehler '13': Typen unverträglich.
Ich vermute, dass liegt eben daran, dass es nun mehrere Target.Rows gibt. Hat jmd. einen Vorschlag, wie ich das verhindern kann?
Besten Dank im Voraus