ich möchte aus einer Textbox1 eine Information, in diesem Fall einen Namen, auslesen. Diesen möchte ich in der Spalte A einer Tabellenblattes suchen und mir dann in dem Textfeld die Informationen der gesuchten Zeile +1 anzeigen lassen. Hat jemand einen Tip für mich. Ich habe bereits die Sub zum Auslesen der ersten Suchanfrage formuliert:
Private Sub CommandButton6_Click()
Dim liZeile As Integer
Dim test As Integer
liZeile = 3
test = 0
'Datensammlung nach Eintrag überprüfen
Do Until Sheets("Matrix").Range("A" & liZeile) = ""
If Sheets("Matrix").Cells(liZeile, 1) = TextBox1.text Then
'Flag für gefundenen Datensatz
test = liZeile
'Datensatz in das Fenster übernehmen
TextBox2.text = Sheets("Matrix").Cells(liZeile, 2)
TextBox3.text = Sheets("Matrix").Cells(liZeile, 3)
TextBox4.text = Sheets("Matrix").Cells(liZeile, 4)
TextBox5.text = Sheets("Matrix").Cells(liZeile, 5)
TextBox6.text = Sheets("Matrix").Cells(liZeile, 6)
TextBox7.text = Sheets("Matrix").Cells(liZeile, 7)
TextBox8.text = Sheets("Matrix").Cells(liZeile, 8)
TextBox9.text = Sheets("Matrix").Cells(liZeile, 9)
TextBox10.text = Sheets("Matrix").Cells(liZeile, 10)
TextBox11.text = Sheets("Matrix").Cells(liZeile, 11)
TextBox12.text = Sheets("Matrix").Cells(liZeile, 12)
TextBox13.text = Sheets("Matrix").Cells(liZeile, 13)
TextBox14.text = Sheets("Matrix").Cells(liZeile, 14)
TextBox15.text = Sheets("Matrix").Cells(liZeile, 15)
TextBox16.text = Sheets("Matrix").Cells(liZeile, 16)
TextBox17.text = Sheets("Matrix").Cells(liZeile, 17)
liZeile = liZeile + 1
Else
liZeile = liZeile + 1
End If
Loop
If test = 0 Then MsgBox "Keine Daten vorhanden"
End Sub
Vielen Dank für entsprechende Hilfe im Voraus. Grüße
Karen