BuildNameDatabase |
This page in 2007 Top Previous Next |
|
Generates a new workbook or worksheet which sets out a table of details of the names defined in a workbook. Applies to SYNTAX result = expression1.BuildNameDatabase Set wbOut = expression2.BuildNameDatabase(wbIn, hiddenNames, specialNames, excludeSpecialNames, outputInSameWorkbook, findOverlaps) expression1 Required. An expression that returns an IOAKAddIn object. expression2 Required. An expression that returns an IOAKAPI object. result An OAKResult enumeration indicating the success or otherwise of the action. wbOut A workbook generated by OAK on which the discrepancy analysis is laid out. wbIn The workbook containing the names that are to be reported by OAK. hiddenNames Required Boolean. TRUE if the database is to include names that are hidden or very hidden. FALSE if the database is to include visible names only. specialNames. Required Variant. Can be Nothing, or an Array or Collection of Strings, specifying any names that are to be excluded from the database if excludeSpecialNames is True. These would normally be names that have particular meaning to Excel. excludeSpecialNames. Required Boolean. TRUE if the database is to exclude from the report of overlapping names any names that are members of the list of special names provided to it. FALSE if it is to show all names. outputInSameWorkbook. Required Boolean. TRUE if the database is to be laid out on a worksheet to be newly added to wbOut. FALSE if the database is to be laid out on a worksheet in a new workbook. findOverlaps. Required Boolean. TRUE if the database is to be supplemented by a report of names that overlap, and so are potential duplicates or sources of error. FALSE if the report of overlapping names is unwanted, which is significantly faster, particularly if the number of defined names is large, since every names has to be compared with every other. Remarks When applied to an IOAKAddIn object, the BuildNameDatabase method activates the same dialog box as is presented when the Analyze discrepancies 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, and acts on the currently active workbook. When applied to an IOAKAPI object, the BuildNameDatabase method generates a report of defined names identical to the one that would be generated by OAK if its Build Name Database command were activated manually from the user interface, but the details of the analysis, including the workbook to be examined, are specified by the parameters submitted to the method. Example To report the names defined in the ActiveWorkbook, as quickly as possible (and so omitting the overlapping names test) Set MyWorkbook = MyOakApi.BuildNameDatabase(ActiveWorkbook,FALSE, Nothing, FALSE, FALSE, FALSE) |