Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default how to identify built-in Names

I want to clear out any user defined names in the names collection, without
touching built-in names like Print_Area, etc.

Should this be done through the workbooks name collection, or the worksheets
name collection; and more importantly, how do I identify a built-in my code.

Thanks, Eric


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default how to identify built-in Names

I would not consider Print_Area to be a built-in name. When you set a print
area, you are, in fact, naming it yourself.

Having said that, you caould try something like the following:

Sub DeleteNames()
Dim nm As Name
For Each nm In ThisWorkbook.Names
If Right(nm.Name, 12) < "Print_Titles" And _
Right(nm.Name, 10) < "Print_Area" Then _
nm.Delete
Next
End Sub

--

Vasant



"Eric" wrote in message
nk.net...
I want to clear out any user defined names in the names collection,

without
touching built-in names like Print_Area, etc.

Should this be done through the workbooks name collection, or the

worksheets
name collection; and more importantly, how do I identify a built-in my

code.

Thanks, Eric




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default how to identify built-in Names

Why not clear them all out, Print_Area etc. will get re-created as required.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Eric" wrote in message
nk.net...
I want to clear out any user defined names in the names collection,

without
touching built-in names like Print_Area, etc.

Should this be done through the workbooks name collection, or the

worksheets
name collection; and more importantly, how do I identify a built-in my

code.

Thanks, Eric




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default how to identify built-in Names

Hi Bob:

I guess if the OP has specific print areas (possibly with repeated titles)
on a number of worksheets where entire worksheets are not to be printed, it
would require doing page setups all over again for each sheet. At least,
that's what I thought!

Regards,

Vasant

"Bob Phillips" wrote in message
...
Why not clear them all out, Print_Area etc. will get re-created as

required.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Eric" wrote in message
nk.net...
I want to clear out any user defined names in the names collection,

without
touching built-in names like Print_Area, etc.

Should this be done through the workbooks name collection, or the

worksheets
name collection; and more importantly, how do I identify a built-in my

code.

Thanks, Eric






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to identify built-in Names

That was my thought too Vasant. I don't want to force the user to
recreate usefull settings if I don't have to.

Your technique is ok for handling Print related names, but there are
other built in names to, so it would be a lot nice if there was a way to
identify them, similar to the way a contol has a built-in property.

Thanks, Eric

*** Sent via Developersdex http://www.developersdex.com ***


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default how to identify built-in Names

What other "built-in" names are you referring to? Can you give an example?

--

Vasant

"Eric Fingerhut" wrote in message
...
That was my thought too Vasant. I don't want to force the user to
recreate usefull settings if I don't have to.

Your technique is ok for handling Print related names, but there are
other built in names to, so it would be a lot nice if there was a way to
identify them, similar to the way a contol has a built-in property.

Thanks, Eric

*** Sent via Developersdex http://www.developersdex.com ***



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default how to identify built-in Names

Hi Eric,

There are quite a few of these built in names, or rather names used by
Excel. Eg, "FilterDatabase" is a hidden sheet level name created with an
Auto filter and could cause minor problems if deleted.

Apart from these names it would be an idea to check any range name you are
about to delete has no precedents or dependants, which can be done
programmatically. But there might be others such as named formulas.

However I wouldn't want to delete names in user's workbook. Instead I would
recommend user to use the "Name Manager" utility by Jan Karel Pieterse and
colleagues:

http://www.jkp-ads.com/ navigate to the utilities page

Regards,
Peter T

"Eric Fingerhut" wrote in message
...
That was my thought too Vasant. I don't want to force the user to
recreate usefull settings if I don't have to.

Your technique is ok for handling Print related names, but there are
other built in names to, so it would be a lot nice if there was a way to
identify them, similar to the way a contol has a built-in property.

Thanks, Eric

*** Sent via Developersdex http://www.developersdex.com ***



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default how to identify built-in Names

Name Manager has an option to hide or show system names.

The filters we use to identify system names are as follows:

If sName Like "*_FilterDatabase" Then
If sName Like "*Print_Area" Then
If sName Like "*Print_Titles" Then
If sName Like "*.wvu.*" Then
If sName Like "*wrn.*" Then
If sName Like "*!Criteria" Then

There may be more ...


regards
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

"Peter T" <peter_t@discussions wrote in message
...
Hi Eric,

There are quite a few of these built in names, or rather names used by
Excel. Eg, "FilterDatabase" is a hidden sheet level name created with an
Auto filter and could cause minor problems if deleted.

Apart from these names it would be an idea to check any range name you are
about to delete has no precedents or dependants, which can be done
programmatically. But there might be others such as named formulas.

However I wouldn't want to delete names in user's workbook. Instead I
would
recommend user to use the "Name Manager" utility by Jan Karel Pieterse and
colleagues:

http://www.jkp-ads.com/ navigate to the utilities page

Regards,
Peter T

"Eric Fingerhut" wrote in message
...
That was my thought too Vasant. I don't want to force the user to
recreate usefull settings if I don't have to.

Your technique is ok for handling Print related names, but there are
other built in names to, so it would be a lot nice if there was a way to
identify them, similar to the way a contol has a built-in property.

Thanks, Eric

*** Sent via Developersdex http://www.developersdex.com ***





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default how to identify built-in Names

Thanks Charles - very useful!

"Charles Williams" wrote in message
...
Name Manager has an option to hide or show system names.

The filters we use to identify system names are as follows:

If sName Like "*_FilterDatabase" Then
If sName Like "*Print_Area" Then
If sName Like "*Print_Titles" Then
If sName Like "*.wvu.*" Then
If sName Like "*wrn.*" Then
If sName Like "*!Criteria" Then

There may be more ...


regards
Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

"Peter T" <peter_t@discussions wrote in message
...
Hi Eric,

There are quite a few of these built in names, or rather names used by
Excel. Eg, "FilterDatabase" is a hidden sheet level name created with an
Auto filter and could cause minor problems if deleted.

Apart from these names it would be an idea to check any range name you
are
about to delete has no precedents or dependants, which can be done
programmatically. But there might be others such as named formulas.

However I wouldn't want to delete names in user's workbook. Instead I
would
recommend user to use the "Name Manager" utility by Jan Karel Pieterse
and
colleagues:

http://www.jkp-ads.com/ navigate to the utilities page

Regards,
Peter T

"Eric Fingerhut" wrote in message
...
That was my thought too Vasant. I don't want to force the user to
recreate usefull settings if I don't have to.

Your technique is ok for handling Print related names, but there are
other built in names to, so it would be a lot nice if there was a way to
identify them, similar to the way a contol has a built-in property.

Thanks, Eric

*** Sent via Developersdex http://www.developersdex.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
A formula to identify tab names in a worksheet Steve Excel Discussion (Misc queries) 3 April 22nd 09 11:46 PM
How do I build a Macro that can identify wooksheet names peter147 Excel Discussion (Misc queries) 4 May 22nd 05 04:26 PM
how was this built vincent Excel Programming 1 October 13th 03 09:17 PM
Built in Commandbars Dave Martin Excel Programming 2 August 31st 03 03:47 AM
Built In CommandBars Sander Lablans Excel Programming 0 August 1st 03 11:59 AM


All times are GMT +1. The time now is 05:30 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"