DataMinerHome
Registered User.
- Local time
- Yesterday, 22:50
- Joined
- Jan 4, 2010
- Messages
- 57
I need to open multiple instances of the same form, and am using Allen Brown's method from http://allenbrowne.com/ser-35.html
However, I want to feed a variable into the New Form line.
For example, his code looks like this:
Thanks for any help you can offer!
However, I want to feed a variable into the New Form line.
For example, his code looks like this:
But I want my code to be something like:Function OpenAClient()
'Purpose: Open an independent instance of form frmClient.
Dim frm As Form
'Open a new instance, show it, and set a caption.
Set frm = New Form_frmClient
frm.Visible = True
frm.Caption = frm.Hwnd & ", opened " & Now()
'Append it to our collection.
clnClient.Add Item:=frm, Key:=CStr(frm.Hwnd)
Set frm = Nothing
End Function
I thought I could just dim Myform as Form, but that doesn't work. So, how can I make this work?Function OpenAClient(MyForm as WhoKnows?)
'Purpose: Open an independent instance of form frmClient.
Dim frm As Form
'Open a new instance, show it, and set a caption.
Set frm = New MyForm
frm.Visible = True
frm.Caption = frm.Hwnd & ", opened " & Now()
'Append it to our collection.
clnClient.Add Item:=frm, Key:=CStr(frm.Hwnd)
Set frm = Nothing
End Function
Thanks for any help you can offer!