When loading forms at the moment I am using the following -
VB Code:
Sub LoadReportsForm() Dim NewMDIChild As New frmReportViewer() 'Set the Parent Form of the Child window. NewMDIChild.MdiParent = Me 'Display the new form. NewMDIChild.Show() End Sub
But I could end up with around 15 forms in my solution and I don't really think I want to use this code for each form.
Is there a way that I can make this into one sub that will load any form by just specifying the form I would like to load???
Regards,
Matt.




Reply With Quote