One form MDI only admitted
-
Hy All. I have following problem. "Run time error 426. One form MDI only admitted" The code allows to print from one form which shows a print preview and, after that, it's possible to click on print commandbutton: Private sub cmdPrint_click() gprint = True Call frmMain.ActiveForm.printText Unload me End Sub Main form is frmMain (MDIForm1). I don't understand why there are two MDI form loaded, as seems to say message error. Elsewhere, in another similar step, I got same message (in this step I load an image into the document. The code is following: Private InsertImage_click() Clipboard.clear clipboard.setdata Picture1.Picture SendMessage frmMain.ActiveForm.Text1.hwnd WM_Paste, 0, 0 Unload Me End Sub I suspect it's wrong "frmMain". Who can help me? Thanks in advance. Ric