Select und Activate nicht benutzen
18.07.2005 15:17:20
otto
wie kann ich aus folgendem Code der gefundene zeilen aus einem Tabellenblatt in ein anderes kopiert, 'Select' und 'Activate' vermeiden?
Hat jemand eine Idee?
Private Sub auflisten()
Call Tabelle ' wählt anhand ComboBox-Eintrag das richtige Tabellenblatt aus
Cells(2, 1) = Reklamation.TextBox1.Text
Dim v2
v2 = Range("A2")
Range("A5").Select
Do
'Call Tabelle
ActiveCell.Offset(0, 200).Select
Dim v4
v4 = Range("A2")
On Error GoTo Ende
Cells.Find(What:=v2, After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
aZelle = ActiveCell.Row
If Reklamation.ComboBox4.Value = "2002" Or Reklamation.ComboBox4.Value = "2003" _
Or Reklamation.ComboBox4.Value = "2004" Or Reklamation.ComboBox4.Value = "2005" Then
If aZelle > 65 Then GoTo Ende
End If
If aZelle > 200 Then GoTo Ende
If ActiveCell = v4 Then GoTo Ende
Rows(ActiveCell.Row).Copy
Worksheets("Liste").Activate
Application.ScreenUpdating = True
Dim z
z = 2
Do While Len(Worksheets("Liste").Cells(z, 1)) > 0
z = z + 1
Loop
Range("A" & z).Select
ActiveSheet.Paste
Application.ScreenUpdating = False
Call Tabelle
Application.CutCopyMode = False
If ActiveCell = v4 Then Exit Do
Loop
Ende:
Application.ScreenUpdating = True
End Sub
Danke im Voraus
otto