This works for me
Dim ary
Dim ctl
ReDim ary(1 To 1)
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Then
If UBound(ary) < 1 Then
ReDim Preserve ary(1 To UBound(ary) + 1)
ary(UBound(ary)) = ctl
End If
End If
Next ctl
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Fendic" wrote in
message ...
Hi
Does anyone know how to assign objects, e.g. Label, TextBox and etc,
into an array?
I can't even assign a label into an object variable. Can anyone help
please? Thank you.
All the best,
Fendic
--
Fendic
------------------------------------------------------------------------
Fendic's Profile:
http://www.excelforum.com/member.php...o&userid=23959
View this thread: http://www.excelforum.com/showthread...hreadid=389461