Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook that contains 4 worksheets:
EcomSec, Programs, EcomData, & Profiles. I do a lot of data manipulation between the EcomSec & EcomData ws and paste that data into the Profiles ws. After this completes I want to delete all but the Profiles ws. It was working until one of the worksheets was moved. Here's the code. Sub test() Application.DisplayAlerts = False For Each wks In Worksheets If InStr("Programs", wks.Name) 0 Then wks.Delete If InStr("EcomSec", wks.Name) 0 Then wks.Delete If InStr("EcomData", wks.Name) 0 Then wks.Delete Next wks End Sub I know there's got to be a way to do this but not sure how. Thanks for your help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Worksheets | Excel Programming | |||
Deleting worksheets | Excel Discussion (Misc queries) | |||
Deleting Worksheets | Excel Programming | |||
Deleting WorkSheets MANY | Excel Programming | |||
Deleting Worksheets in VBA | Excel Programming |