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: 39
Default Handling Errors with Workbooks.OpenText

I've got this line of code:

Workbooks.OpenText FileName:=sFilePath & ".xls", _
DataType:=xlDelimited, Tab:=True

The file is opened using the path and filename entered by the user
into a form.

How can I handle errors so that if the file/path is invalid or the
file doesn't exist, it gives an error message rather than falling
over?

Thanks.

 
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
Workbooks.Opentext - oldskool '97 bradsalmon Excel Programming 4 June 9th 06 03:44 PM
Handling Errors and MessageBox Joel Mills Excel Programming 4 June 2nd 05 05:53 PM
Handling errors in formulas (how annoying are they!) anon90210 Excel Discussion (Misc queries) 1 January 17th 05 01:26 PM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
Handling Errors from Worksheet Functions Nigel[_4_] Excel Programming 1 October 7th 03 07:46 PM


All times are GMT +1. The time now is 01:29 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"