This page:
https://bettersolutions.com/vba/erro...ing-errors.htm
says:
"If you are generating errors, then you should add your number to the vbObjectError constant. Eg Err.Raise Number = vbObjectError + 1000
The range 513 - 65535 is available for user defined errors"
Ok, but i did, and got a native error:
Err.Raise vbObjectError+515
Automation error
A syntax error occurred trying to evaluate a query string
This site
https://exceldevelopmentplatform.blo...criptions.html
says the error code for that error-message is
EVENT_E_QUERYSYNTAX As Long = &H80040203
The VBA immediate pane confirms this:
If i'm supposed to add vbObjectError, and if 513-65535 is usable, then why does `Err.Raise vbObjectError+515` give me a native error!?
bettersolutions.com also says:
"The range 513 - 65535 is available for user defined errors"
Ok, let's say they mean my custom codes should start at 513, and forget about vbObjectError.
But their Codes page shows native errors of 520, 521, some 700's, and some 31000's.
https://bettersolutions.com/vba/erro...rror-codes.htm
also O'Reilly says:
"we are left with numbers in the range vbObjectError + 512 to vbObjectError + 65535"
https://www.oreilly.com/library/view...0/ch09s04.html
So i'm totally confused.
Thx!
also asked here
https://www.excelforum.com/excel-pro...ml#post5574397