I have found this code in this forum:
Dim objForm As Form
Dim sValue As String
Dim FullTypeName As String
Dim FormInstanceType As Type
' Form class name
sValue = "Form2"
' Assume that form classes' namespace is the same as ProductName
FullTypeName = Application.ProductName & "." & sValue
' Now, get the actual type
FormInstanceType = Type.GetType(FullTypeName, True, True)
' Create an instance of this form type
objForm = CType(Activator.CreateInstance(FormInstanceType), Form)
' Show the form instance
objForm.Show()
but i need to show the form once even how many times a button is clicked. is this possible?
thanks