AW: Txt aus Textbox in Zelle
24.07.2005 19:17:55
Erich
Hallo Lorenz,
vcielleicht nicht die beste, aber wohl eine Mglichkeit, das Problem zu lösen: Du merkst dir die 60 Zeilennummern in einem Array. Dazu (ungetestet):
Dim TPos(1 to 60) as long ' (außerhalb der Prozeduren)
Private Sub ComboBox6_Change()
Dim iCounter As Integer
Dim Found As Range
Dim LoLetzte As Long
LoLetzte = IIf(IsEmpty(Range("AD65536")), Range("AD65536").End(xlUp).Row, 65536)
Set Found = Range("AD20:AD" & LoLetzte).Find(ComboBox6.Value, Range("AD" & LoLetzte), , xlPart, , xlNext)
For iCounter = 1 To 60
Controls("TextBox" & iCounter).Text = _
Worksheets("Daten").Cells(Found.Row, iCounter).Text
TPos(iCounter) = Found.Row ' Ergänzung
Next iCounter
End Sub
Dann beim Zurückschreiben:
For i = 1 to 60
cells(TPos(i), 1) = Controls("TextBox" & i).Text
next i
Grüße aus Kamp-Lintfort
Erich