|
-
Aug 31st, 2008, 05:40 PM
#1
Thread Starter
Member
[02/03] Open Varible Named Form
I am trying to open a form using varible names. I can not get it to work.
Dim wInvItemSelected As String
Dim wIndex As Integer
wIndex = lstInvInqSelect.SelectedIndex
Dim WFormName As String
WFormName = Trim(InvMenusForm(wIndex))
Dim objNewForm As Object = Activator.CreateInstance(Type.GetType(WFormName)) <==== Error Here
Dim frm As Form = DirectCast(objNewForm, Form)
frm.Show()
The error is shown on a message box "Microsoft Development Enviroment"
an unhandled exception of the 'System.argumentnullexception' occurred in mscorlib.dll
Additional Information: Value cannot be null
I can not find the error, can anyone help.
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|