Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Quick name deletion line required

Hi all

With Application.ThisWorkbook

'Line required here that does the following:
'Delete all names in ThisWorkbook that have
'the string "Global" contained within the name
'but which are NOT global names, ie
'which are local to a worksheet

End With 'Application.ThisWorkbook

Sorry, folks, I know it should be trivial but I got stuck.

--
Return email address is not as DEEP as it appears


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Quick name deletion line required

Hi Jack,

'Line required here that does the following:
'Delete all names in ThisWorkbook that have
'the string "Global" contained within the name
'but which are NOT global names, ie
'which are local to a worksheet


Ah, those names <g

Sub RemoveNamesWithGlobal(oWkbk as Workbook)
Dim oNm as Name
For Each Onm in oWkbk.Names
If Instr("Global",Onm.Name)0 And Instr("!",oNm.Name)=0 Then
Onm.Delete
End If
Next
End Sub

Of course this can be combined with the other one I gave you.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

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
Is there a quick way to page breaks through out 25,000 line sheet Stacy Excel Discussion (Misc queries) 0 February 12th 10 11:03 PM
I need a basic quick time line design clt64 Excel Discussion (Misc queries) 1 February 14th 08 07:46 PM
name deletion rk0909 Excel Discussion (Misc queries) 2 January 4th 08 11:03 PM
Quick search required cashman Excel Discussion (Misc queries) 2 September 10th 06 03:19 PM
Multiple line deletion in excel SafariQn Excel Worksheet Functions 8 October 2nd 05 02:49 AM


All times are GMT +1. The time now is 02:21 AM.

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

About Us

"It's about Microsoft Excel"