Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete all sheets in workbook that contain "Dump" in the name Porr via OfficeKB.com Excel Worksheet Functions 2 May 19th 10 10:25 PM
How do I delete Sheets if "Delete" is greyed out? carriemca Excel Discussion (Misc queries) 1 April 10th 06 05:31 PM
Supress "delete sheets" warning Hari[_3_] Excel Programming 0 September 14th 04 09:02 PM
Supress "delete sheets" warning Ron de Bruin Excel Programming 0 September 14th 04 08:59 PM
How2 Delete "Not exist" charts/sheets? fatfish[_4_] Excel Programming 4 July 22nd 04 02:17 PM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"