Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We have a simple macro to delete all named cells in the current workbook. It
works fine in a macro sheet, but we cannot get it to work in an XLA, I believe because we can't seem to grab the active worksheet via VB. Thoughts appreciated. Sub NoNames() ' ' Macro1 Macro ' Macro recorded 7/22/2005 by KURIENT ' Dim n As Long Dim m As Long m = ThisWorkbook.Names.Count For n = 1 To m ThisWorkbook.Names(1).Delete Next n End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David
Use Activeworkbook instead of Thisworkbook Thisworkbook = the add-in -- Regards Ron de Bruin http://www.rondebruin.nl "David Iacoponi" wrote in message ... We have a simple macro to delete all named cells in the current workbook. It works fine in a macro sheet, but we cannot get it to work in an XLA, I believe because we can't seem to grab the active worksheet via VB. Thoughts appreciated. Sub NoNames() ' ' Macro1 Macro ' Macro recorded 7/22/2005 by KURIENT ' Dim n As Long Dim m As Long m = ThisWorkbook.Names.Count For n = 1 To m ThisWorkbook.Names(1).Delete Next n End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See also this Add-in
http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Hi David Use Activeworkbook instead of Thisworkbook Thisworkbook = the add-in -- Regards Ron de Bruin http://www.rondebruin.nl "David Iacoponi" wrote in message ... We have a simple macro to delete all named cells in the current workbook. It works fine in a macro sheet, but we cannot get it to work in an XLA, I believe because we can't seem to grab the active worksheet via VB. Thoughts appreciated. Sub NoNames() ' ' Macro1 Macro ' Macro recorded 7/22/2005 by KURIENT ' Dim n As Long Dim m As Long m = ThisWorkbook.Names.Count For n = 1 To m ThisWorkbook.Names(1).Delete Next n End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel names in workbook - how to delete all? | Excel Discussion (Misc queries) | |||
How to delete all defined names from a workbook? | Excel Worksheet Functions | |||
How to delete all defined names from a workbook? | Links and Linking in Excel | |||
Delete Define names across workbook | Excel Worksheet Functions | |||
Delete names in workbook | Excel Programming |