LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Error trapping

I would like to know if there is a way to catch a specific error. I allow
users to conditionally select files by checking boxs on a userform. If the
file doens't exist I would like to process the program as if the box was not
checked. The problem I'm having is not knowing which file is missing so I
don't know what part of the program to skip. For example:

Run-tim error '1004':

'filesname.CSV' COULD NOT BE FOUND. CHECK THE SPELLING OF THE FILE NAME, AND
VERIFY THAT THE FILE LOCATION IS CORRECT.

If filename.csv is missing I would like to skip the code that processes the
data in filename.csv. I could handle it with a bunch of error routines but I
would rather find out if I can extract the name of the missing file from the
error.

Thanks in advance for the help!
 
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
Error Trapping gazza67[_2_] Excel Discussion (Misc queries) 2 September 6th 07 06:11 PM
error trapping JohnE Excel Programming 2 April 27th 06 03:50 PM
Error Trapping Rafi Excel Programming 3 February 14th 06 11:42 PM
Error Trapping Andrew Excel Programming 1 April 5th 05 07:23 AM
Error Trapping Neil Excel Programming 1 January 5th 04 04:38 PM


All times are GMT +1. The time now is 11:12 PM.

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"