Hi guys
i have 2 problem
1- i have workbook with 70 sheets and i hide them all, i use this code for search in multiple sheets
but when the sheets are hidden, the search code dose not work properly
Code
Dim SheetsToSearch, ws As Excel.Worksheet, r As Range
SheetsToSearch = Array("QA", "SA", "SU", "MD1", "HS", "MA", "LO", "PM", "HR", "IM", "IT", "PR", "EN", "EG", "EV", "QA", "PL") '// Enter the exact sheet names of sheets to be searched
For Each ws In ThisWorkbook.Sheets
If Not IsError(Application.Match(ws.Name, SheetsToSearch, 0)) Then
With ws.Range("A1:AB5000")
Set r = .Find(Target, [a1], xlValues, xlWhole, xlByRows, , True) 'find the cell whose value is equal to x and activate it
If Not r Is Nothing Then
ws.Activate: r.Activate
Exit Sub
End If
End With
End If
Next
Display More
2- i cant open a special sheet with any code
Code
activeworkbook.sheets(index).activate
Workbooks(“Book1”).Sheets(“Sheet1”).Activate
Workbooks(“Book1”).Sheets(“Sheet1”).Select
Sheets(“QA”).Activate
can some one help me ?