ofern01
asked on
How Can I call a form that it's name is on a variable
I have a table with multiple record in it. Each record, when edit, must display a diferent entry form. when I bring up the record,I placed the name of the form on a variable, but now I need to call that form.
I need something like this:
Dim lcfrm As String = "FrmMntExtVnd" ' this will be diferent for each record
Dim frmcall As windows.form
frmcall = CType(lcfrm, windows.form)
frmcall.Show()
I need something like this:
Dim lcfrm As String = "FrmMntExtVnd" ' this will be diferent for each record
Dim frmcall As windows.form
frmcall = CType(lcfrm, windows.form)
frmcall.Show()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Somehow I get an error saying a null reference on parameter not allowed. (with in the gettype()) and that I need to specify a New keyword
I tried the Ronald and worked fine. Later I will try to find out why that error when it shouldn't. I just don't have time now.
Thanks, That was great help
I tried the Ronald and worked fine. Later I will try to find out why that error when it shouldn't. I just don't have time now.
Thanks, That was great help
Dim formName As String = "WindowsApplication1.FrmMn
Dim frm As Form = DirectCast(Activator.Creat
frm.Show()