عليكم السلام و رحمة الله
هذا الكود نقلته لك من فترة
وهذا تعديل ليتوقف بعد كل نتيجة بحث ليسألك هل تريد الاستمرار؟
For Each oSheet In ActiveWorkbook.Worksheets
oSheet.Activate
oSheet.[a1].Activate
Set Firstcell = Cells.Find(What:=WhatToFind, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not Firstcell Is Nothing Then
Firstcell.Activate
MsgBox ("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & Firstcell.Address)
If MsgBox("next.......?", vbYesNo) = vbNo Then GoTo 1
On Error Resume Next
While (Not NextCell Is Nothing) And (Not NextCell.Address = Firstcell.Address)
Set NextCell = Cells.FindNext(After:=ActiveCell)
If Not NextCell.Address = Firstcell.Address Then
NextCell.Activate
MsgBox ("Found " & Chr(34) & WhatToFind & Chr(34) & " in " & oSheet.Name & "!" & NextCell.Address)
End If
Wend
End If
Set NextCell = Nothing
Set Firstcell = Nothing
Next oSheet
End If
MsgBox ("End of Search")
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("TOC").Select
1 End Sub
السطر المعدل
If MsgBox("next.......?", vbYesNo) = vbNo Then GoTo 1
الملف المرفق
كود ممتاز للبحث فى كل ا2لشيتات.rar