Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Addin macro to delete names in current workbook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Addin macro to delete names in current workbook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Addin macro to delete names in current workbook

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel names in workbook - how to delete all? GOH Excel Discussion (Misc queries) 4 May 21st 08 05:30 AM
How to delete all defined names from a workbook? Dmitry Kopnichev Excel Worksheet Functions 15 November 14th 05 03:26 PM
How to delete all defined names from a workbook? Dmitry Kopnichev Links and Linking in Excel 15 November 14th 05 03:26 PM
Delete Define names across workbook Mike Excel Worksheet Functions 4 September 28th 05 12:41 AM
Delete names in workbook U. Kõrsmaa Excel Programming 6 February 8th 04 08:37 PM


All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"