Hi,
I need help with evaluate Method.
What I am trying to do is write for loop for following.
UserForm2.Label1.Caption = ""
UserForm2.Label2.Caption = ""
UserForm2.Label3.Caption = ""
UserForm2.Label4.Caption = ""
UserForm2.Label5.Caption = ""
UserForm2.Label6.Caption = ""
UserForm2.Label7.Caption = ""
UserForm2.Label8.Caption = ""
I tried this(below) and many other thing, but nothing seem
to work. Any suggestion on making this work?
For i = 1 To 8
Evaluate ("UserForm2.Label" & CStr(i) & ".Caption = """)
Next
For i = 1 To 8
Me.Controls("UserForm2.Label" & CStr(i)).Caption = ""
Next
Thanks
Mitesh
Leo Heuser - 22 Jul 2004 20:32 GMT
Hi Mitesh
One way:
For i = 1 To 8
Me.Controls("label" & i) = ""
Next counter

Signature
Best Regards
Leo Heuser
Followup to newsgroup only please.
> Hi,
> I need help with evaluate Method.
[quoted text clipped - 21 lines]
> Thanks
> Mitesh