PC Review


Reply
Thread Tools Rate Thread

How to continue macro if there is an error value

 
 
=?Utf-8?B?bXNkcm9sZg==?=
Guest
Posts: n/a
 
      2nd Nov 2006
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      2nd Nov 2006
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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to continue running if error Norvascom Microsoft Excel Programming 6 1st Mar 2010 02:16 AM
How do I continue a macro? =?Utf-8?B?RUJI?= Microsoft Word Document Management 0 19th Oct 2007 01:11 AM
macro to scroll the worksheet and continue to run macro in backgro =?Utf-8?B?TWljYWg=?= Microsoft Excel Programming 2 1st Oct 2007 05:10 PM
VB code to continue macro Brian Microsoft Excel Misc 3 9th May 2006 03:12 AM
open workbook from a macro and continue this macro afterwards =?Utf-8?B?Q2hyaXMgRGUgTHV5Y2s=?= Microsoft Excel Programming 3 19th Dec 2005 12:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:19 AM.