+ Reply to Thread
Results 1 to 4 of 4

Determining if a worksheet exists

  1. #1
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Question Determining if a worksheet exists

    Hi when I try to do the following I get an error 'Subscript out of range'

    Please Login or Register  to view this content.
    To do this do I HAVE to then have a worksheet variable to test against, such as:

    Please Login or Register  to view this content.
    I was hoping I might be able to achive the same test within one line?

    Thanks
    Last edited by Phil_V; 06-11-2009 at 06:06 AM.
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Determining if a worksheet exists

    You could possibly think of going down the Evaluate route

    Please Login or Register  to view this content.
    The use of COUNTBLANK should cater for A1 on sheet of interest containing an error value if exists.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Determining if a worksheet exists

    Here's a UDF that tests if a worksheet exists

    Please Login or Register  to view this content.
    Use it like this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Determining if a worksheet exists

    Cheers all

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1