G
Guest
I am interested to learn if anyone knows of a method to dynamically create an
instance of a form by use of the form name? This would be apposed to the
standard method of Set frmVar = New_MyForm.
An example of what I would like to do is something like this:
Function OpenFormInstance(strFrmName as string) as Boolean
Dim frmVar as Form
Set frmVar = New ?strFrmName?
....
At present I have a similar function that uses a select statement for all
forms that I know I would like to open as an instance.
Example:
Function OpenFormInstance(strFrmName as string) as Boolean
Dim frmVar As Form
Dim bStatus As Boolean
Select Case strFrmName
Case "MyForm1"
Set frmVar = New Form_MyForm1
bStatus = True
Case "MyForm2"
Set frmVar = New Form_MyForm2
bStatus = True
End Select
'if(bStatus) then Add frmVar to MyInstanceCollection
....
instance of a form by use of the form name? This would be apposed to the
standard method of Set frmVar = New_MyForm.
An example of what I would like to do is something like this:
Function OpenFormInstance(strFrmName as string) as Boolean
Dim frmVar as Form
Set frmVar = New ?strFrmName?
....
At present I have a similar function that uses a select statement for all
forms that I know I would like to open as an instance.
Example:
Function OpenFormInstance(strFrmName as string) as Boolean
Dim frmVar As Form
Dim bStatus As Boolean
Select Case strFrmName
Case "MyForm1"
Set frmVar = New Form_MyForm1
bStatus = True
Case "MyForm2"
Set frmVar = New Form_MyForm2
bStatus = True
End Select
'if(bStatus) then Add frmVar to MyInstanceCollection
....