Searching for a Worksheet name

  • Thread starter Thread starter Guest
  • Start date Start date
This is some example code

Dim sh As Worksheet

On Error Resume Next
Set sh = Worksheets("Bob")
On Error GoTo 0
If sh Is Nothing Then
MsgBox "Bob not found"
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Moni!

Bob has given you code for this but you may not be aware of right
clicking any of the small arrows to the left of the worksheet tabs.
This brings up a list of the worksheets.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top