XL: Macro Error Changing Link with ! in Hard Drive Name

ID: Q118882


The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, version 7.0


SYMPTOMS

In Microsoft Excel, when you use the CHANGE.LINK function to change the source of a link in your workbook, you receive a macro error if the name of your hard drive contains an exclamation point (!). If you use the ChangeLink method, and the name of your hard drive contains an exclamation point, you receive the following error message:

Run-time error '1004':

ChangeLink method of Workbook class failed
This problem does not occur in Microsoft Excel version 4.0.


WORKAROUND

To change the source of a link in your worksheet, when the name of your hard drive contains an exclamation point, do either of the following:

  • Use the Links dialog box by doing the following:

    1. From the Edit menu, choose Links.


    2. Select the link you want to change, and choose the Change Source button.


    3. Select the desired workbook you for the source, and choose Change.


    4. In the Links dialog box, choose Close.




  • -or-

  • Change the source by using a macro or Visual Basic procedure, and rename your hard drive so that it does not contain an exclamation point.



STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


REFERENCES

For more information about CHANGE.LINK, choose the Search button in Help and type:

CHANGE.LINK function

Additional query words: 5.00c err msg

Keywords : kberrmsg
Version : 5.00 5.00c 7.00
Platform : WINDOWS
Issue type :


Last Reviewed: September 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.