View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ward376 ward376 is offline
external usenet poster
 
Posts: 360
Default Check whether a sheet is present in a workbook

Here is one way:

Sub look()
On Error Resume Next
If Len(ThisWorkbook.Worksheets.Item("Alignment_Retail ").Name) = 0
Then
On Error GoTo 0
MsgBox "The sheet isn't there."
Else
MsgBox "The sheet is there."
End If
End Sub

I've done this before, but now use a sheet management procedure in all
my projects.

Cliff Edwards