Microsoft KB Archive/124669

From BetaArchive Wiki

Microsoft Knowledge Base

XL5: Change.Link?() Function Returns Macro Error or #VALUE

Last reviewed: September 12, 1996
Article ID: Q124669

The information in this article applies to:

  • Microsoft Excel for Windows, versions 4.0, 5.0, 5.0c
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0

SYMPTOMS

In Microsoft Excel 5.0 Help, and on page 48 of the "Microsoft Excel Function Reference," version 4.0, the description for Microsoft Excel 4.0 CHANGE.LINK?() macro function lists the following arguments as optional:

   old_text
   new_text
   type_of_link

(The Function Reference also states that the "old_text" argument is assumed to be the active workbook if it is omitted.)

This information is incorrect. If the CHANGE.LINK?() function is called without arguments, your macro will halt and will display a "macro error" error message. If error checking is turned off, by adding the =ERROR(false) statement, then CHANGE.LINK?() will return the #VALUE error value.

WORKAROUNDS

To work around this problem, follow the appropriate procedure below to pass the first argument, "old_text", to the CHANGE.LINK?() function.

Method 1: If you are using Microsoft Excel for Windows, use the following

          statement

             =CHANGE.LINK?("C:\EXCEL\FILENAME.XLS")

          where C:\EXCEL\FILENAME.XLS is the full path to the file (source)
          to which your worksheet (dependent) is linked. This use of the
          CHANGE.LINK?(old_text) function will bring up the Change Links To
          dialog box, and you can select the file to which you want your
          link changed.

Method 2: If you are Microsoft Excel for the Macintosh, use the following

          statement

             =CHANGE.LINK?("Hard_Disk_Name:Excel:Filename")

          where Hard_Disk_Name:Excel:Filename is the full path to the file
          (source) to which your worksheet (dependent) is linked. This use
          of the CHANGE.LINK?("old_text") function will bring up the Change
          Links To dialog box, and you can select the file to which you
          want your link changed.

KBCategory: kbcode kbmacro kbdocerr

KBSubcategory:

Additional reference words: 4.00 5.00 Mac Links XL4 XL5



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.