Rich (BB code):
Sub LoopThroughSheets()
Dim findRng As Range
Dim firstRow As Long
Dim nextRow As Variant
Dim allFinds As String
Dim numberOfRowsWithSameMKB As Integer
Workbooks(SYSDatei).Activate
For j = 0 To SizeOfMKB_array - 1
For Each ws In Workbooks(SYSDatei).Worksheets
wsName = ws.Name
With Workbooks(SYSDatei).Worksheets(wsName)
Set findRng = .UsedRange.Find(MKB_array(j), lookat:=xlPart)
If Not findRng Is Nothing Then
firstRow = findRng.row
'MsgBox firstRow
Call SearchForPKZ(firstRow)
Do
Set findRng = .UsedRange.FindNext(findRng)
nextRow = findRng.row
Call SearchForPKZ(nextRow)
End If
End With
Next ws
Next j
End Sub
vba editor is showing error message on the red coloured text above.. pls helppp
Last edited by a moderator: