View Single Post
  #5   Report Post  
BillCPA
 
Posts: n/a
Default

Thanks - I'm still a little fuzzy on creating functions.

"Bob Phillips" wrote:

-----------------------------------------------------------------
Function SheetExists(Sh As String, _
Optional wb As Workbook) As Boolean
'-----------------------------------------------------------------
Dim oWs As Worksheet
If wb Is Nothing Then Set wb = ActiveWorkbook
On Error Resume Next
SheetExists = CBool(Not wb.Worksheets(Sh) Is Nothing)
On Error GoTo 0
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)


"BillCPA" <Bill @ UAMS wrote in message
...
Is there a quick and easy statement to use (in VBA) to check and see if a
particular worksheet exists (by name)?

--
Bill @ UAMS