Thread: On Error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kevin Stecyk Kevin Stecyk is offline
external usenet poster
 
Posts: 74
Default On Error

To,

You should post the appropriate snippet of code. You should be looping, so
it ought not be a problem. But if you post your code, I am sure someone
will spot your error.

Regards,
Kevin



"TO" wrote in message
...
I have book where I open workbooks based on a filenames
contained in a column. When the file is opened code runs
and perfoms various operations. The next cell in the
column becoms the target filename and that file is opened
and data is extracted.

The problem I have is that the filenames in the column do
not always match the files in the destination folder.

If there is a filename but no actual file, I would like
to skip all the following code and go to the next cell
(new filename) and open etc. I tried using "On Error
GoTo". This works unless there are two consecutive "bad"
filenames.

Thanks in advance