Hi Diego,
I tried oForm = SBO_Application.Forms.ActiveForm; also. But it also gives same error.
Actually I do not need separate close button. But when I close the form using default close button on the form it gives same error.
I have seen output using EventViewer the error message is populated after FORM_UNLOAD() event.
Thanks.