I'm having touble debugging an agent because everytime I turn the debugger on I get the error message "Error: 4416 - Dialogbox cannot be used in this context; a document must be selected". However, the code runs fine paste this point when the debugger is off.
The code the causes the error is:
If ws.DialogBox("(Dialog - CloseObservation)", True, True, False, False, False, False, "Corrective Action Input", obsdoc) Then
'Other code here...
I have used this code elsewhere with no problems. Could it be that this code is in a Function called from the main agent???
Need to debug the remaining portion of the agent so any help would be greatly appreciated.