Weitere Frage zu bestehendem Thema
28.04.2018 11:21:30
Mr.T
ich habe vor eingier Zeit eine Frage zur Find-Methode gehabt, Thema "Find Mthode was ist zu beachten" https://www.herber.de/cgi-bin/callthread.pl?index=1617493#1617493
Leider weiß ich nicht wie ich darauf noch was antworten kann, weil ich immer im Archiv lande... Naja nun zu meiner Frage
In meinem Projekt habe ich folgenden Code:
Private Sub TextBox2_Change()
Dim WkSh As Worksheet
Dim rZelle As Range
Dim lngIndex As Long
Set WkSh = ThisWorkbook.Worksheets("Datenpool_Gesamtmaschine")
If TextBox2.Value "" Then
With WkSh.Columns(2)
Set rZelle = .Find(What:=Replace$(Expression:=TextBox2.Value, _
Find:=vbCr, Replace:=""), LookAt:=xlPart, LookIn:=xlValues, MatchCase:=False)
If Not rZelle Is Nothing Then
TextBox3.Value = .Cells(rZelle.Row, 2).Value
TextBox40.Value = .Cells(rZelle.Row, 8).Value
TextBox41.Value = .Cells(rZelle.Row, 9).Value
TextBox42.Value = .Cells(rZelle.Row, 10).Value
TextBox51.Value = .Cells(rZelle.Row, 11).Value
TextBox60.Value = .Cells(rZelle.Row, 12).Value
TextBox43.Value = .Cells(rZelle.Row, 13).Value
TextBox52.Value = .Cells(rZelle.Row, 14).Value
TextBox61.Value = .Cells(rZelle.Row, 15).Value
TextBox44.Value = .Cells(rZelle.Row, 16).Value
TextBox53.Value = .Cells(rZelle.Row, 17).Value
TextBox62.Value = .Cells(rZelle.Row, 18).Value
Set rZelle = Nothing
End If
End With
End If
Set WkSh = Nothing
End Sub
Sobald der Text ind TextBox2 über 255 Zeichen lang ist, meckert mir Excel die fett markierten Zeilen an.
Gibt es eine einfach Möglichkeit das Ganze zu beheben?
Vielen Dank im Voraus
David