+ Reply to Thread
Results 1 to 2 of 2

test for sheet then delete it

Hybrid View

  1. #1
    Registered User
    Join Date
    08-30-2006
    Posts
    4

    test for sheet then delete it

    hello,
    I have the following code which tests for a specific worksheet, It will find the sheet but I am unable to delete the page it found.
    What would the proper syntax be?

    If WksExists(c.Value) = True Then ' Test for existance of sheet

    ' (c.Value) is a variable for the worksheet name but if I try

    Worksheet(c.Value).Delete the program errors out


    Thanks for your input

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936
    You didn't tell us what the error was; however, since you left the "s" off of worksheet, I suspect that is was a "sub or function not defined" compiler error.
    Ben Van Johnson

+ 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