Results 1 to 6 of 6

Thread: Delete worksheets without loop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    My only suggestion would be to use Sheets instead of WorkSheets

    Code:
    Sheets(Application.Transpose(Evaluate("Row(2:" & Sheets.Count & ")"))).Delete
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  2. #2
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    15
    Quote Originally Posted by Excel Fox View Post
    My only suggestion would be to use Sheets instead of WorkSheets
    Code:
    Sheets(Application.Transpose(Evaluate("Row(2:" & Sheets.Count & ")"))).Delete
    And a good suggestion it is!

Similar Threads

  1. Loop to two columns and Concatenate values
    By ivandgreat in forum Excel Help
    Replies: 15
    Last Post: 04-14-2013, 08:20 PM
  2. Loop Through And Delete Multiple File Types In A Folder
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 03-30-2013, 04:47 PM
  3. Loop through a folder and find word
    By k0st4din in forum Excel Help
    Replies: 7
    Last Post: 12-08-2012, 02:22 PM
  4. Speed up Loop VBA
    By PcMax in forum Excel Help
    Replies: 15
    Last Post: 04-09-2012, 04:20 PM
  5. Loop in Array
    By stanleydgromjr in forum Excel Help
    Replies: 5
    Last Post: 07-28-2011, 05:06 PM

Tags for this Thread

Posting Permissions

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