You can use Dir to check if the file exist before you replace the value in the formula
If Dir(FileCell.Value) <> "" Then
--
Regards Ron de Bruin
http://www.rondebruin.nl
"msdrolf" <(E-Mail Removed)> wrote in message news:3FE829AB-AA44-4784-B502-(E-Mail Removed)...
>I have a macro which replaces the file name in a formula. Sometimes the new
> file name does not yet exist and the "Update Value.." box pops up. I hit
> CANCEL and the macro continues. Is there a line of code which will cause the
> macro to hit cancel and continue without any input from me. I came across
> the following code but don't know what to put after THEN
> If IsError(ActiveCell.Value) Then
>
> Thanks