Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
assign objects into array or object variable?
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 hel please? Thank you. All the best, Fendi -- Fendi ----------------------------------------------------------------------- Fendic's Profile: http://www.excelforum.com/member.php...fo&userid=2395 View this thread: http://www.excelforum.com/showthread.php?threadid=38946 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
assign objects into array or object variable?
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add new worksheet and assign it to an object variable? | Excel Programming | |||
FileSearch Object - Cannot assign to variable | Excel Programming | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Dynamically Assign Objects to Form Objects. | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming |