Evaluate Method.

M

Mits

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top