Microsoft KB Archive/118882

= Macro Error Changing Link with ! in Hard Drive Name =

Article ID: 118882

Article Last Modified on 8/15/2005

-

APPLIES TO


 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0c

-



This article was previously published under Q118882



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:

 From the Edit menu, choose Links. Select the link you want to change, and choose the Change Source button. Select the desired workbook you for the source, and choose Change. 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.</li></ul>

<div class="status_section">

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.

<div class="references_section">