Dear Sir,
I want to track the form1 instance
My code is like :
Private Sub Command1_Click()
Dim frm As New Form1
frm.Show
End Sub
I am opening so many form instance and if i want to Change some
property of "Form1" then how to do it?
when i try like this it did not work:
Private Sub Command2_Click()
Form1.txtname.text="GOOGLE"
End Sub
so please help me how can i asign the value of Form1.txtname
Thanks!
Raghu Bhandari
Ralph - 06 Dec 2007 13:54 GMT
> Dear Sir,
>
[quoted text clipped - 20 lines]
> Thanks!
> Raghu Bhandari
Create a Public Property in Form1
[Air code]
Public Property Let TxtName( txt As String )
txtName.Text = txt
End Property
While not a major issue in this case, I strongly advise that you don't use
the "As New" construct. Use the following instead...
Dim frm As Form1
Set frm = New Form1
frm.TxtName = "GOOGLE"
frm.Show
Ken Halter - 06 Dec 2007 17:44 GMT
> Dear Sir,
When you post to multiple groups, one at a time, it's called Multiposting
and you create the possibility of someone overlooking the *fact* that there
are perfectly valid answers in another group. It's a waste of time for
everyone involved.
Instead of multiposting, Crosspost. That requires you to place the names of
all target groups in the "Newsgroups" field at once, separated by a
semi-colon. That makes sure that everyone trying to help you can see, and
possibly correct other answers, or just go to the next question and try to
help someone else. It saves you time because your question and all answers
will show in every group in your crosspost list. It's great for everyone
involved, including those looking for answers in the future.
Crosspost if you must, Multipost as an absolute last resort

Signature
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm