Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
An example:
Private Sub CommandButton1_Click() Dim group As New Collection For Each ctrl In Me.Controls If TypeOf ctrl Is MSForms.TextBox Then group.Add ctrl, ctrl.Name End If Next For i = 1 To group.Count j = Int(Rnd() * group.Count + 1) group(j).Value = group(i).Name Next msgbox Group("Textbox3").Value End Sub -- Regards, Tom Ogilvy "stefantem" wrote in message ... The textboxes are in an userform. dim group1 as New Collection group1.Add Item.... then refer the elements How can I use this? -- stefantem ------------------------------------------------------------------------ stefantem's Profile: http://www.excelforum.com/member.php...o&userid=13594 View this thread: http://www.excelforum.com/showthread...hreadid=500081 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Is it possible to group parts with controls? | Excel Discussion (Misc queries) | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
Group Controls | Excel Programming | |||
group name for form controls | Excel Programming |