Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Error...GoTo 6

Status
Not open for further replies.

graphix03

Technical User
Oct 8, 2003
189
0
0
US
Hi,

Does anyone knows when to code this On Error GoTo code...?
I want to do it right, but I'm confused when/where to
code the error code so when there's an error it knows what to do...so, do you code it in ALL sub routines and functions, or just on certain one? I read a few books, but
they have the error codes just on some procedure for command button, but not all.

any input would be appreciated. thanks much.
 
Which merely reinforces my earlier point about vbObjectError...
 
What, no-one curious enough to investigate vbObjectError?
 
Ok, ok, so I looked it up. FACILITY_ITF is the base constant for the range of errors reserved for a component's interface. The hex value of vbObjectError is 80040000. The 8 sets the severity bit which means an error. The 4 sets the facility code to interface.

This begs the question: is it a bad idea to evaluate err.number, and assume that if it's < 0 that the error is a vb object error? I'm beginning to think that there might be other facility codes that I'm unaware of that might evaluate to less than 0.

Thx

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top