Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I've obviously missing something here and would appreciate any help. I've seen a few similar threads but they haven't helped .... I have an excel 97 workbook with a series of named ranges and would like to delete them all. I'm suring the code ... Sub a() Worksheets(1).Select For i = 1 To Worksheets.Count Worksheets(i).Select For n = 1 To ActiveSheet.Names.Count strNAME = ActiveSheet.Names(n).Name ActiveSheet.Names(n).Delete Next n n = 1 Worksheets(i).Select Next i End Sub .... however when I run this code I keep getting error 9 from the subscript being out of range. I'm sure I'm making a simple mistake... Thanks in advance Cheers Bevan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete unnecessary Named Ranges | Excel Discussion (Misc queries) | |||
duplicate named ranges- how to detect, delete? | Excel Discussion (Misc queries) | |||
macro to delete all named ranges in a workbook en masse? | Excel Discussion (Misc queries) | |||
Delete named ranges beginning with a string | Excel Programming | |||
Delete LOCAL named ranges | Excel Programming |