Private Sub CommandButton2_Click()
Dim source As Worksheet
Dim f As Long
Dim lastRow As Long
Dim x As Long
Dim Temp As Integer
Set source = ActiveWorkbook.Worksheets("Datentabelle")
lastRow = xlsGetLastRow(source)
x = TextBox_Ticketnummer
Temp = 0
For f = lastRowNr(source) To 2 Step -1
If source.Range("A" & f) = x Then
zeile = f
Temp = 1
Exit For
End If
Next f
If Temp = 1 Then
Unload Me
End If
MsgBox f
source.Range("A" & f).Value = TextBox_Ticketnummer
source.Range("B" & f).Value = TextBox_St_Anfang
source.Range("C" & f).Value = TextBox_St_Ende
source.Range("D" & f).Value = TextBox_Betr_Gebiet
source.Range("E" & f).Value = TextBox_Betr_POP
source.Range("F" & f).Value = TextBox_Betr_KR
source.Range("G" & f).Value = TextBox_Betr_DSW
source.Range("H" & f).Value = TextBox_Firmenname
source.Range("I" & f).Value = TextBox_Adresse
source.Range("J" & f).Value = TextBox_ASP
source.Range("K" & f).Value = TextBox_Schadenstelle
source.Range("L" & f).Value = ComboBox_Kabeltyp
source.Range("M" & f).Value = ComboBox_Darkfiber
source.Range("N" & f).Value = ComboBoxWDM_Strecke
source.Range("O" & f).Value = ComboBox_DP_TYP
source.Range("P" & f).Value = TextBox_Betr_PK
source.Range("Q" & f).Value = TextBox_Betr_Grosskunden
source.Range("R" & f).Value = Textbox_Bemerkung
source.Range("S" & f).Value = CheckBox_Störung_erledigt
End Sub