Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How to continue macro if there is an error value

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB code to continue macro Brian Excel Discussion (Misc queries) 3 May 9th 06 03:12 AM
How do I replace "#N/A" error, to continue my formula w/o error? Ali Khan Excel Worksheet Functions 2 February 20th 06 03:49 PM
open workbook from a macro and continue this macro afterwards Chris De Luyck Excel Programming 3 December 19th 05 12:12 PM
VBA codes for macro to continue Brian Excel Programming 11 May 23rd 05 11:33 PM
The way to continue do macro recording Susan Soo[_2_] Excel Programming 2 February 16th 05 03:21 PM


All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"