Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A formula to identify tab names in a worksheet | Excel Discussion (Misc queries) | |||
How do I build a Macro that can identify wooksheet names | Excel Discussion (Misc queries) | |||
how was this built | Excel Programming | |||
Built in Commandbars | Excel Programming | |||
Built In CommandBars | Excel Programming |