It's prettty easy to write. Here's one solution:
Sub test()
MsgBox SheetXists("Sheet1")
MsgBox SheetXists("Rumsfeld Quotes")
End Sub
Function SheetXists(SheetName As String) As Boolean
On Error Resume Next
SheetXists = Len(Sheets(SheetName).Name)
End Function
HTH. Best wishes Harald
"BillCPA" <Bill @ UAMS skrev i melding
...
Is there a quick and easy statement to use (in VBA) to check and see if a
particular worksheet exists (by name)?
--
Bill @ UAMS
|