Hi
I have the following code which will search all wksheets for a given name (or part of) and I would like to display message if wksheet does not exist.
However when performing the searching the msgbox will pop up each time to say it does not exist before it has searched all wksheets.
is there code that will display the message after all wksheets have been searched
thanks
my code:
For Each wsFind In Sheets
With wsFind
If .Name Like myArr & "*" Then
MsgBox wsFind.Name & " LIKE " & myArr
Find_Sheet = True
Exit For
Else
MsgBox "DOES NOT EXIST"
End If
End With
Next
I have the following code which will search all wksheets for a given name (or part of) and I would like to display message if wksheet does not exist.
However when performing the searching the msgbox will pop up each time to say it does not exist before it has searched all wksheets.
is there code that will display the message after all wksheets have been searched
thanks
my code:
For Each wsFind In Sheets
With wsFind
If .Name Like myArr & "*" Then
MsgBox wsFind.Name & " LIKE " & myArr
Find_Sheet = True
Exit For
Else
MsgBox "DOES NOT EXIST"
End If
End With
Next