Visual Basic Concepts

Raising an Error on Component Busy Timeout

See Also

For the component busy condition, you can bypass both the Component Busy dialog box and the replacement message by setting the Boolean OLEServerBusyRaiseError property of the App object to True. Visual Basic will retry your request for the length of time specified by the OLEServerBusyTimeout property, and then raise an error in the procedure that made the Automation request, just as if the user had pressed the Cancel button on the Component Busy dialog box.

The error returned is –2147418111 (&h80010001). In the error handler for the procedure, you can then take whatever action is most appropriate. For example, you could display a complex dialog box that offered the user several retry options or alternatives.

This property will be particularly useful for components designed to run on remote network computers, using the Remote Automation feature of Visual Basic, Enterprise Edition. Such a component may call on other components, and it must handle errors in those calls without displaying any forms.

There is no corresponding property for the request pending condition. Once an Automation request has been accepted by the component, the client program must wait until the request is complete.