View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default check if a worksheet exist - VBA

one way:

Dim wkSht As Worksheet
On Error Resume Next
Set wkSht = Worksheets("TargetSheet")
On Error GoTo 0
If Not wkSht Is Nothing Then
'worksheet exists
Else
'worksheet doesn't exist
End If

In article <2ex7b.407150$Ho3.62997@sccrnsc03,
"Warren" wrote:

Please help.

In VBA, how do I check if a worksheet exists?

Thanks

Warren