Issue with "Loop through all the sheets" with VBA
I would like to check on all sheets that is there a cell in the 6nd row which contains "text". The code is the following but it does not work. It works only on the active sheet.
For Each ws In ThisWorkbook.Worksheets
For j = 1 To 30
If Cells(6, j) = "text" Then
MsgBox (j)
Else
End If
Next j
Next ws
If I just for example: range("A1")="Yes" it works on all sheet.