RecreateNames |
This page in 2003 Top Previous Next |
|
Deletes a specified name, creates a new one, and changes all formulas and names that refer to the old name so that they refer instead to the new one. Applies to SYNTAX Set result1 = expression1.RecreateNames Set result2 = expression2.RecreateNames(Range1, labelRegion, forceLocal , [scope]) 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. result2 An IRenameResult which indicates the success or otherwise of the action. range1 A Range containing the cells to be renamed, with their new names along the edges. labelRegion Required NamesSelection, indicating from which edge of range1 the new names are to be taken. One of NamesSelection_Bottom, NamesSelection_Left, NamesSelection_None, NamesSelection_Right, NamesSelection_Top. forceLocal Required Boolean. If True, the names created will be local, associated with the worksheet on which they are created. If False, the names created will be local only if they being with an exclamation mark. Otherwise, they will be global, associated with the workbook in which it is created. scope Optional. One of •an Excel Workbook object, if OAK is to adjust any formulas which refer to the names being replaced in that workbook. •an Excel Worksheet object, if OAK is to adjust any formulas which refer to the names being replaced in that worksheet. •Nothing, if OAK is to adjust any formulas which refer to the names being replaced in any open workbook. Remarks When applied to an IOAKAddIn object, the RecreateNames method activates the same dialog box as is presented when the Recreate names command is selected manually from the OAK user interface. The action that follows is controlled by the data gathered by the dialog box from the user. When applied to an IOAKAPI object, the RecreateNames method changes names as specified by the parameters submitted to the method. |