Dim Zellenanzahl As Integer
Dim Datensatzabfrage As Integer
Dim Zeile As Integer
Zeile = 5
Application.Workbooks.Open (txtpfadangabe)
Windows(Me.txtpfadangabe.Text).Activate
Zellenanzahl = ActiveSheet().Range("A5:A65536").SpecialCells(xlCellTypeConstants).Count
For Datensatzabfrage = 1 To Zellenanzahl
Windows(Me.txtpfadangabe.Text).Activate
Cells(Zeile, 1).Value = txtKabelnummer
Cells(Zeile, 2).Value = cboKabelart
Cells(Zeile, 3).Value = cboKabeltyp
Cells(Zeile, 5).Value = txtKabellänge
Windows("Messprotokollformular2").Activate
GoTo Kabelvergleich
nächster_Datensatz:
Zeile = Zeile + 1
Next Datensatzabfrage