View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chong Moua Chong Moua is offline
external usenet poster
 
Posts: 22
Default check if worksheet exists

Hi Craig,

Here's one way...
------------------------
Sub SheetExist()

On Error GoTo ErrorTrap

Sheets("MySheet").Select
MsgBox "Sheet does exist!"
Exit Sub

ErrorTrap:
MsgBox "Sheet does not exist!"

End Sub
------------------------
Hope this helps...

Chong Moua

-----Original Message-----
What is the code to check if a worksheet exists once the

workbook is
activated?

Craig Wilks

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.