Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting nonactive Sheets in Excell
Dim sh1 as object, sh as object
On Error Resume Next set sh1 = Activeworkbook.worksheets("Data Input") On Error goto 0 if not sh1 is nothing then for each sh in Activeworkbook.Sheets if lcase(sh.name) < "data input" then Application.displayAlerts = False sh.Delete Application.DisplayAlerts = true End if Next Else msgbox "this workbook does not contain data input" End if -- Regards, Tom Ogilvy "Ben H" <Ben wrote in message ... Hi all. Basically, I need to be able to delete all hte sheets in a open workbook except for the sheet called "Data Input". The rest of the sheets will have different names, but most likely "Data Output" (orginal, isn't it?) Any ideas would greatly help. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
deleting sheets 2&3 | Excel Discussion (Misc queries) | |||
deleting sheets | Excel Discussion (Misc queries) | |||
Deleting nonactive Sheets in Excell | Excel Programming | |||
Deleting sheets | Excel Programming | |||
deleting sheets | Excel Programming |