-
Does anyone know what this error, means and how I can fix it.
It only happens, in the compiled version of the program (The one that runs independantly of VB), It doesn't occur in the version that needs VB.
It also only started happening in the new version of the program, and I don't know what it means!
Heres the error;
"Run time error 401"
"Cant show non-modal form when modal form is displayed"
-
AliBail,
When a modal form is displayed, you can’t display another non-modal form.
For example, I have 3 forms
Code:
'this is the code for form1
Private Sub Command1_Click()
'show form2 as Modal
Form2.Show vbModal, Me
End Sub
'this is the code for form2
Private Sub Command1_Click()
'show form3 as NON MODAL, this will raise error
Form3.Show
End Sub
How to fix it:
Use either the Unload statement or the Hide method on the modal form before attempting to use the Show method on a non-modal form.
Regards,
TheBao