Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to delete a workbook name using the code I got from "Record Macro",
ActiveWorkbook.Names("index_3").Delet However, when I execute I get Run-time error 1004 Application-defined or object-defined erro Any suggestions Thanks Big- Background info I'm importing a text file and that part is peachy. When I go to overwrite the data from the last import another workbook name is assigned to the same range. I'm concerned about generating a near-infinite number of names as each import indexes the name "index_n+1" I'd be happy to reuse the names or just have a way of deleting an ever larger number. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Big-E,
That line of code should work, assuming you have a Name named "index_3" in the active workbook. You'll get a runtime error 1004 if the name does not exist. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Big-E wrote: I'm trying to delete a workbook name using the code I got from "Record Macro", ActiveWorkbook.Names("index_3").Delete However, when I execute I get Run-time error 1004, Application-defined or object-defined error Any suggestions? Thanks, Big-E Background info: I'm importing a text file and that part is peachy. When I go to overwrite the data from the last import another workbook name is assigned to the same range. I'm concerned about generating a near-infinite number of names as each import indexes the name "index_n+1" I'd be happy to reuse the names or just have a way of deleting an ever larger number. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Multiple Names | Excel Discussion (Misc queries) | |||
deleting names from the name box | Excel Discussion (Misc queries) | |||
deleting duplicate names | Excel Discussion (Misc queries) | |||
deleting duplicate names | Excel Worksheet Functions | |||
deleting workbook names in excel | Excel Programming |