Consulting

Results 1 to 3 of 3

Thread: Deleting worksheets with specific name ??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Deleting worksheets with specific name ??

    Hi,

    does somebody know how to search specific Worksheet(s), that has the Name "Diagram1" or "Diagram2" and so on, and delete them / it if they / it exist(s).
    Here is a try of my code.
    Sub Makro1()
    
    Dim s As Worksheet
    
    For Each s In Worksheets
    If s.Name Like "Diagram*" Then
    s.Delete
    End If
    Next s
    
    End Sub
    Last edited by Bob Phillips; 04-08-2016 at 10:22 AM. Reason: Added code tags

Posting Permissions

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