gnaga
Well-known Member
- Joined
- Jul 9, 2002
- Messages
- 748
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
Hi,
I have a userform with 25 textboxes. I have named each of them as txtDesp1,txtDesp2....txtDesp25"
I would like to change its property by using them in the For...Next Loop
I am using as follows
<pre>
Private Sub UserForm_Activate()
Dim I%
For I = 1 To 25
"txtDesp" & CStr(I) = ""
Next I
End Sub
</pre>
This code is not getting executed. Since there is no Index feature in VBA userform controls. Is there any other way to change the controls property in For Next Loop?
Thanks.
GNaga
I have a userform with 25 textboxes. I have named each of them as txtDesp1,txtDesp2....txtDesp25"
I would like to change its property by using them in the For...Next Loop
I am using as follows
<pre>
Private Sub UserForm_Activate()
Dim I%
For I = 1 To 25
"txtDesp" & CStr(I) = ""
Next I
End Sub
</pre>
This code is not getting executed. Since there is no Index feature in VBA userform controls. Is there any other way to change the controls property in For Next Loop?
Thanks.
GNaga