LocalizeNamesInCells |
This page in 2007 Top Previous Next |
|
Turns into worksheet level names any workbook level names that happen to match the text in any one of the specified cells. Example: You have workbook level names Dog and Cat. You highlight three cells that say Fish, Cat and Snake. LocalizeNamesInCells will cause the name Cat to be changed from a global (workbook level) name to a local (worksheet level) name, Sheet!Cat. Applies to SYNTAX result1 = expression1.LocalizeNamesInCells expression2.LocalizeNamesInCells(range1) expression1 Required. An expression that returns an IOAKAddIn object. expression2 Required. An expression that returns an IOAKAPI object. result1 An OAKResult enumeration indicating the success or otherwise of the action. range1 Required Range. The cells containing text, which will be used to identify names for localization. Remarks When applied to an IOAKAddIn object, the LocalizeNamesInCells performs the same action as OAK's OAK | Names | Localize Names in Cells command, including presenting a confirmatory dialog box. The cells against which the global names are compared is the current selection, and the worksheet with which OAK associates the names is the active worksheet. When applied to an IOAKAPI object, the LocalizeNamesInCells method •the workbook level names that are altered are those that are defined in the workbook in which the cells specified by range1 are located •those names are compared with the contents of the cells specified as range1 •the worksheet with which OAK associates the names that match the cells is the worksheet on which range1 is located. This command is usually given immediately after use of Excel's Create names command, since that produces global names but offers no facilities for making them local. When a name is turned from global to local, references to it on the same worksheet will continue to work, because local references to local names do not need to be qualified. References to a localized name on other worksheets do need to be qualified, from =MyName to =Sheet!MyName. OAK does not perform this step automatically. A clue that such modification is necessary is that #NAME! errors appear in the worksheet after this method is activated. |