+ Reply to Thread
Results 1 to 4 of 4

Worksheet Delete

  1. #1
    Registered User
    Join Date
    11-10-2006
    Posts
    20

    Worksheet Delete

    Hi All

    I need to delete the contents of 63 worksheets in a workbook in a specific range, I wrote the following code but all it does is delete the first sheet 63 time and does not move onto the other sheets, can someone help/explain my problem.

    Please Login or Register  to view this content.
    Many thanks

    Alan

    Excel 2007
    Last edited by drums4monty; 02-13-2011 at 11:18 AM.

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

    Re: Worksheet Delete

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-27-2010
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Worksheet Delete

    Hi,

    When referring to a range, if you do not specify the worksheet containing the range it's assumed that you are referring to the active sheet. Try changing the code to:
    Please Login or Register  to view this content.

    You should also note that you don't need to select a range to modify it, therefore you can shorten it to:
    Please Login or Register  to view this content.



    Cheers,
    Dom

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Worksheet Delete

    Please Login or Register  to view this content.



+ 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