Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Abelerd Fischer   on Jan 24 In MS Office Category.

  
Question Answered By: Rhys Evans   on Jan 24

Dim wSheet As Worksheet



On Error Resume Next

Set wSheet = Sheets("Sheet1")

If wSheet Is Nothing Then 'Doesn't exist

MsgBox "Worksheet does not exist", _

vbCritical,"OzGrid.com"

Set wSheet = Nothing

On Error GoTo 0

Else 'Does exist

MsgBox "Sheet 1 does exist", _

vbInformation,"OzGrid.com"

Set wSheet = Nothing

On Error GoTo 0

End If



There is more at: http://www.ozgrid.com/VBA/IsWorkbookOpen.htm

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 


Tagged: