View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to continue macro if there is an error value

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" wrote in message ...
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