Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Is there anyway to delete worksheets via code where one worksheet contains a
range with the names of the tabs on the worksheets I want to delete? i.e., Sheet 1 has a range that has the values, A, B, C. These are the names on tabs for 3 worksheets. I want to have code that says "delete worksheets with the tabs named A, B, C. Let me know if you need more info. TIA! |
#2
![]() |
|||
|
|||
![]() With Worksheets("Sheet1") Application.DisplayAlaerts = False For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row On Error Resume Next Worksheets(Cells(i,"A").Value).Delete On Error Goto 0 Next i Application.DisplayAlerts = True End With -- HTH RP (remove nothere from the email address if mailing direct) "Jenn" wrote in message ... Is there anyway to delete worksheets via code where one worksheet contains a range with the names of the tabs on the worksheets I want to delete? i.e., Sheet 1 has a range that has the values, A, B, C. These are the names on tabs for 3 worksheets. I want to have code that says "delete worksheets with the tabs named A, B, C. Let me know if you need more info. TIA! |
#3
![]() |
|||
|
|||
![]()
Why not just Ctrl+Click the tabs and use EditDelete Sheet?
Regards |:) On 8/22/05 5:08 PM, in article , "Jenn" wrote: Is there anyway to delete worksheets via code where one worksheet contains a range with the names of the tabs on the worksheets I want to delete? i.e., Sheet 1 has a range that has the values, A, B, C. These are the names on tabs for 3 worksheets. I want to have code that says "delete worksheets with the tabs named A, B, C. Let me know if you need more info. TIA! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Invalid Range Names | Excel Discussion (Misc queries) | |||
Create a list in one worksheet of the other worksheets' names | Excel Worksheet Functions | |||
Sorting names in a range | Excel Worksheet Functions | |||
Deleting Names in Excel 2003 | Excel Discussion (Misc queries) | |||
SUMIF across a range of worksheets | Excel Worksheet Functions |