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

ID: Q118882

5.00 5.00c 7.00 WINDOWS kbprg kberrmsg

The information in this article applies to:

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:

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
    
    
    KBCategory: kbprg KBSubcategory: kberrmsg

    Additional reference words: 5.00 5.00c 7.00 err msg

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

    Last Reviewed: September 15, 1996