Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    233

    Unanswered: determine if a sheet name exists

    Rather than going through each sheet in a work book, is there another way to determine if a sheet exists??

  2. #2
    Join Date
    May 2009
    Posts
    258
    Sure, the following code will do it:
    Code:
        Dim ws As Worksheet, Exists As Boolean
        On Error Resume Next
        Set ws = ActiveWorkbook.Sheets("SheetName")
        Exists = Not ws Is Nothing
        On Error GoTo 0
    Regards,

    Ax

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •