|
-
March 12th, 2001, 09:13 PM
#1
How to toss an error message for an invalid ActiveX control property assignment?
Hi, there
I am working on an VB activeX control. In the "Let" functions of my control's properties, I'd like to report those invalid assignment. For example, if the user assigned a negative value to a property which only accepts positive value, I would like VB to pop up a message box with a red cross in it and carries the error message defined by me. I know how to achieve it with ATL control, but I don't know how with VB activeX control. Please advise and thanks in advance...
-
March 13th, 2001, 03:56 AM
#2
Re: How to toss an error message for an invalid ActiveX control property assignment?
To raise an error from an activeX control :
Err.Raise vbObjectError + 1000, "ActiveXCTLName", "Incorrect Parameter"
You can replacte the description and source, but it is best to have your error number > the constant vbObjectError to avoid conflicting with existing error numbers.
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|