Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
c
As
Range
Dim
lngZiel
As
Long
Dim
varSuche
As
Variant
If
Not
Intersect(Target, Range(
"D7"
))
Is
Nothing
Then
With
Sheets(
"Ergebnisse"
)
lngZiel = .Cells(.Rows.Count, 3).
End
(xlUp).Row + 1
End
With
varSuche = Range(
"D7"
).Value
With
Sheets(
"BerechneteTeile"
)
Set
c = .Columns(32).Find(varSuche, LookIn:=xlValues, lookat:=xlWhole)
If
Not
c
Is
Nothing
Then
.Rows(c.Row).Copy Sheets(
"Ergebnisse"
).Cells(lngZiel, 1)
MsgBox
"Bauteil wurde in die Stückliste aufgenommen"
Call
Limitierung
Call
Legogesicht
Else
MsgBox
"Bauteil wurde nicht gefunden, bitte erneut scannen!"
End
If
End
With
End
If