Private
Sub
CommandButton2_Click()
On
Error
Resume
Next
Dim
ZEIL
As
Long
Dim
MMMM
As
Long
Dim
AAAZ
As
Long
Dim
SCHOT
As
Long
ComboBox3.Clear
ComboBox3.Visible =
True
Label8.Visible =
True
AAAZ =
CDbl
(ZZFFF2.Cells(Rows.Count, 1).
End
(xlUp).Row)
SCHOT = 0
For
ZEIL = 2
To
AAAZ
MMMM = 0
If
TextBox5.Value <>
""
Then
MMMM =
CDbl
(ZZFFF2.Cells(ZEIL, 2).Find(What:=TextBox5.Value, lookat:=xlWhole).Row)
End
If
If
TextBox5.Value <>
""
Then
MMMM =
CDbl
(ZZFFF2.Cells(ZEIL, 3).Find(What:=TextBox5.Value, lookat:=xlWhole).Row)
End
If
If
TextBox5.Value <>
""
Then
MMMM =
CDbl
(ZZFFF2.Cells(ZEIL, 4).Find(What:=TextBox5.Value, lookat:=xlWhole).Row)
End
If
If
TextBox5.Value <>
""
Then
MMMM =
CDbl
(ZZFFF2.Cells(ZEIL, 5).Find(What:=TextBox5.Value, lookat:=xlWhole).Row)
End
If
If
TextBox5.Value <>
""
Then
MMMM =
CDbl
(ZZFFF2.Cells(ZEIL, 6).Find(What:=TextBox5.Value, lookat:=xlWhole).Row)
End
If
If
MMMM > 0
Then
SCHOT = SCHOT + 1
With
ComboBox3
.AddItem MMMM - 1
End
With
End
If
Next
ZEIL
If
SCHOT = 0
Then
ComboBox3.Visible =
False
Label13.Visible =
False
End
If
Exit
Sub
End
Sub
und hier gibt er mir die Zeile wieder, in der der Suchbegriff gefunden worden ist:
Private
Sub
ComboBox3_Change()
On
Error
GoTo
EERR
If
ComboBox3.Value <>
""
Then
ComboBox1.Value = ComboBox3.Value
End
If
Exit
Sub
EERR:
End
Sub