I want to cycle through all the sheets in an openworkbook to see if there is any with a certain condition. Here is the code I tried. Where am I going wrong?
[vba]Sub test()
Dim detailtest As Worksheet
Set ActiveWorkbook = wB(1)
For detailtest = Worksheet(1) To Worksheet(2)
On Error Resume Next
Set findString = Range("C1", "D1").Find(What:="Whse")
If findString Is Nothing Then
Else
MsgBox "it works."
Next detailtest
End Sub
[/vba]