+ Reply to Thread
Results 1 to 3 of 3

Delete sheets with "@"

Hybrid View

  1. #1
    Angus
    Guest

    Delete sheets with "@"

    I have a VBA to "show pages" by email address at a pivot table. Then the
    program calls a Sub to email the sheets with sheet name "@". But how to
    delete those sheets with "@" after sending the emails?

    Sub PagebyUser()
    Sheets("PivotData").Select
    ActiveSheet.PivotTables("PivotTable1").ShowPages PageField:="Email"
    Call SendbyUser
    End Sub

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Sub DeleteSheets()
    Application.DisplayAlerts = False
    For Each sht In Worksheets
    If InStr(sht.Name, "@") > 0 Then
    sht.Delete
    End If
    Next
    Application.DisplayAlerts = True
    End Sub


    call the above in your sub.

    Mangesh

  3. #3
    Angus
    Guest

    Re: Delete sheets with "@"

    Thanks.

    "mangesh_yadav" wrote:

    >
    > Sub DeleteSheets()
    > Application.DisplayAlerts = False
    > For Each sht In Worksheets
    > If InStr(sht.Name, "@") > 0 Then
    > sht.Delete
    > End If
    > Next
    > Application.DisplayAlerts = True
    > End Sub
    >
    >
    > call the above in your sub.
    >
    > Mangesh
    >
    >
    > --
    > mangesh_yadav
    > ------------------------------------------------------------------------
    > mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
    > View this thread: http://www.excelforum.com/showthread...hreadid=379980
    >
    >


+ 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