Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I delete sheets with the names PLANID or FEETOTAL through VBA?
-- Thank you, Jodie |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.DisplayAlerts=False
Worksheets("PLANID ").Delete Worksheets("FEETOTAL ").Delete Application.DisplayAlerts=True "Jodie" wrote in message ... How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
remove the unwanted space after the sheet name and quote mark - happened
when I copied the names. Application.DisplayAlerts=False Worksheets("PLANID").Delete Worksheets("FEETOTAL").Delete Application.DisplayAlerts=True "Patrick Molloy" wrote in message ... Application.DisplayAlerts=False Worksheets("PLANID ").Delete Worksheets("FEETOTAL ").Delete Application.DisplayAlerts=True "Jodie" wrote in message ... How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Sub deleteSheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With Application .DisplayAlerts = False With ws If .Name = "PLANID" Or .Name = "FEETOTAL" Then .Delete End If End With .DisplayAlerts = True End With Next End Sub "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Mike, this worked great and did not give me any pop up messages
about permanently deleting sheets. -- Thank you, Jodie "Mike" wrote: Try this Sub deleteSheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With Application .DisplayAlerts = False With ws If .Name = "PLANID" Or .Name = "FEETOTAL" Then .Delete End If End With .DisplayAlerts = True End With Next End Sub "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this
Sub deleteSheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With Application .DisplayAlerts = False With ws If .Name = "PLANID" Or .Name = "FEETOTAL" Then .Delete End If End With .DisplayAlerts = True End With Next End Sub "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sub deleter()
worksheets("PLANID").delete worksheets("FEETOTAL").delete end "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro()
Application.DisplayAlerts = False Sheets("Sheet2").Delete 'To delete more than one sheet 'Sheets(Array("Sheet2", "Sheet3")).Delete Application.DisplayAlerts = True End Sub If this post helps click Yes --------------- Jacob Skaria "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sheets("PLANID").Delete
"Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub SheetKiller()
Application.DisplayAlerts = False Sheets("PLANID").Delete Sheets("FEETOTAL").Delete Application.DisplayAlerts = True End Sub -- Gary''s Student - gsnu200908 |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sub deleter()
worksheets("PLANID").delete worksheets("FEETOTAL").delete end "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro()
Application.DisplayAlerts = False Sheets("PLANID").Delete 'to delete both 'Sheets(Array("PLANID","FEETOTAL")).Delete Application.DisplayAlerts = True End Sub If this post helps click Yes --------------- Jacob Skaria "Jodie" wrote: How can I delete sheets with the names PLANID or FEETOTAL through VBA? -- Thank you, Jodie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming |