Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete sheets with "@"
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. Manges -- mangesh_yada ----------------------------------------------------------------------- mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047 View this thread: http://www.excelforum.com/showthread.php?threadid=37998 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete all sheets in workbook that contain "Dump" in the name | Excel Worksheet Functions | |||
How do I delete Sheets if "Delete" is greyed out? | Excel Discussion (Misc queries) | |||
Supress "delete sheets" warning | Excel Programming | |||
Supress "delete sheets" warning | Excel Programming | |||
How2 Delete "Not exist" charts/sheets? | Excel Programming |