Hi all,
When opening an office document that expects user interaction my app is hanging. I assume that using App.OleServerBusyTimeout and App.OleServerBusyRaiseError will somehow allow me to trap this.
The only problem is that I can’t work out how to raise an error after a certain amount of time.
The sample below tries to open a db with a compile error in the startup form, causing Access to ask for user intervention. What I want to do is wait 5-10 seconds and then close the database and move on.
Is this possible and am I looking at the wrong approach.
Note it could be word, access or excel that hangs.
After further reading, it looks like I am out of luck. It appears that once I have opened the app, I am comited. I must leave it visible and manually intervene if necessary.
Anyone have any other thoughts?
MS say
start Quote
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