|
so ich hab dann doch ein bissel gespielt
meine Textboxen heißen aber auch einfach nur TextBox1 bis Textbox34
gefüllt werden diese Textboxen aus den Zeilen 3 bis 36
Private Sub CommandButtonSuchen_Click()
Dim c As Range
Dim i As Long
Dim strSuche As String
strSuche = TextBoxSuchen.Value
With Worksheets("Übersicht Kompanie")
Set c = .Rows(2).Find(strSuche, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
For i = 1 To 34
Controls("Textbox" & i).Value = .Cells(i + 2, c.Column).Value
Next
End If
End With
End Sub
Private Sub CommandButtonÄndern_Click()
Dim c As Range
Dim i As Long
Dim strSuche As String
strSuche = TextBoxSuchen.Value
With Worksheets("Übersicht Kompanie")
Set c = .Rows(2).Find(strSuche, LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
For i = 1 To 34
.Cells(i + 2, c.Column) = Controls("Textbox" & i).Value
Next
End If
End With
End Sub
|