RemoveRefErrorNames

This page in 2003
Top  Previous  Next

Removes any names that have #REF! in their definitions, a sign that they probably refer to cells that have been deleted.

Applies to

IOAKAddIn

SYNTAX

result1 = expression1.RemoveRefErrorNames

expression1   Required.  An expression that returns an IOAKAddIn object.

result1   An OAKResult enumeration indicating the success or otherwise of the action.

Remarks

The RemoveRefErrorNames method performs the same action as the OAK Development | Names | Other | Remove #REF! command.

The command deletes names that contain "#REF!" anywhere in the definition.  This is usually a sign that the cells to which the names relate have been deleted; if the cells are gone, the name might as well go too.  But it isn't always so.  The formula =IF(ROW(A1)=1,#REF!,23) is a legitimate formula, but OAK will delete it anyway because it contains the unwanted string.  For this reason OAK presents a confirmatory dialog before doing the deletion.

Since there is no neat way of interacting programmatically with that dialog, no version of RemoveRefErrorNames is provided for the IOAKAPI method.