Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This works for me
Sub DeleteNames() Dim nme As Name For Each nme In ActiveWorkbook.Names If Left(nme.Name, 30) = "Query_from_MS_Access_Database_" Then _ nme.Delete Next nme End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "kurt" wrote in message oups.com... Hello All When I run my progran I use names the macro itself append number when it is runned (xxxx); why?? How do I delete all theese names "Query_from_MS_Access_Database_xxxx" Sub DeleteNames() Dim sh As Workbook On Error Resume Next For t = 1 To 3500 x = "Query_from_MS_Access_Database_" & t sh.Names(x).Delete Next t End Sub This code does not work properly even if I change workbook to worksheet and run i in the sheet or the workbook Please help??? regards Kurt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Names in a Workbook | Excel Programming | |||
deleting names from the name box | Excel Discussion (Misc queries) | |||
deleting duplicate names | Excel Worksheet Functions | |||
Deleting Names | Excel Programming | |||
Deleting range names | Excel Programming |