Unimatic1140
New Member
- Joined
- Jul 18, 2002
- Messages
- 27
Hello everyone, I would like to write an onError/Goto routine that responds differently to two kinds of file errors.
#1 If the macro tries to open a worksheet that doesn't exist, then goto routine#1,
#2 If the macro tries to open a worksheet that another user on the network already has open then goto routine #2, etc.
The problem I’m having is the Err.number function seems to return "1004" for both of these file errors even though they different. Is there a way I can distinguish between an open file and a file that does not exist?
Any help will certainly be appreciated.
#1 If the macro tries to open a worksheet that doesn't exist, then goto routine#1,
#2 If the macro tries to open a worksheet that another user on the network already has open then goto routine #2, etc.
The problem I’m having is the Err.number function seems to return "1004" for both of these file errors even though they different. Is there a way I can distinguish between an open file and a file that does not exist?
Any help will certainly be appreciated.