Message 1 of 9
Question on error number (from Ed Jobe cls)

Not applicable
12-06-2003
11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
from a post by Ed Jobe, that tirelessly generous vb genius lurking around
here at times, I'm trying to understand a couple lines...
Case Is = vbObjectError + 1001, 70 '70 = file access permission denied
I don't under stand this syntax vbObjectError + 1001, 70
the help for the + operator doesn't have any thing about a following comma
and extra argument so I don't quite know what that's doing
any way on my machine, the error when a drawing is already open
-2147467259
and vbObjectError = -2147221504
so I would think I should be using a line like":
Case Is = vbObjectError - 245755
which is very different, can anyone shed some light on this?
also why is it better to use the vbObjectError constant instead of using the
number directly - I would assume its so if vb rewrites it's constants in the
next version but keeps the offsets the same then the old code still
runs...is that the idea? or is it something else???
question 2: (greedy ain't i?)
another error line is:
Set dbxdoc = AcadApplication.GetInterfaceObject("ObjectDBX.AxDbDocument")
If strExt = "dwt" Then
Err.Raise vbObjectError + 1001
End If
in "vbObjectError + 1001" is the 1001 arbitrary or based on a list of codes
somewhere?
thanks in advance
Mark
from a post by Ed Jobe, that tirelessly generous vb genius lurking around
here at times, I'm trying to understand a couple lines...
Case Is = vbObjectError + 1001, 70 '70 = file access permission denied
I don't under stand this syntax vbObjectError + 1001, 70
the help for the + operator doesn't have any thing about a following comma
and extra argument so I don't quite know what that's doing
any way on my machine, the error when a drawing is already open
-2147467259
and vbObjectError = -2147221504
so I would think I should be using a line like":
Case Is = vbObjectError - 245755
which is very different, can anyone shed some light on this?
also why is it better to use the vbObjectError constant instead of using the
number directly - I would assume its so if vb rewrites it's constants in the
next version but keeps the offsets the same then the old code still
runs...is that the idea? or is it something else???
question 2: (greedy ain't i?)
another error line is:
Set dbxdoc = AcadApplication.GetInterfaceObject("ObjectDBX.AxDbDocument")
If strExt = "dwt" Then
Err.Raise vbObjectError + 1001
End If
in "vbObjectError + 1001" is the 1001 arbitrary or based on a list of codes
somewhere?
thanks in advance
Mark