Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having trouble isolating the various error types when
opening workbooks. I wrap the code in ON error stuff, then open, then check the error. Whether the file exists, or does NOT exist, the err is 1004. I see elsewhere there is reference to Error( ) where 53 is one of them and 55 is the other, but I cannot seem to figure out how to check these. Right now, I am using the first 5 chars of the error DESCR and it works, but I don't like that approach. Help please! ; -) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not use the Dir function before you attempt to open the file and if it
returns empty you know the file is not there. msgbox dir("c:\windows\win.ini") returns win.ini as a string and nothing if the file doesn't exist. Robin Hammond www.enhanceddatasystems.com "sclark" wrote in message ... I am having trouble isolating the various error types when opening workbooks. I wrap the code in ON error stuff, then open, then check the error. Whether the file exists, or does NOT exist, the err is 1004. I see elsewhere there is reference to Error( ) where 53 is one of them and 55 is the other, but I cannot seem to figure out how to check these. Right now, I am using the first 5 chars of the error DESCR and it works, but I don't like that approach. Help please! ; -) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trapping errors in a VLOOKUP function | Excel Worksheet Functions | |||
Trapping errors with Conditional Formatting | Excel Discussion (Misc queries) | |||
Trapping an open Workbook | Excel Programming | |||
annoying bell when trapping errors | Excel Programming | |||
Remind me to set Error Trapping to Break on Unhandled Errors | Excel Programming |