LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Collection as parameter


Problem:
In UserForm1 I have TextBox1, TextBox2, CommandButton1 and
CommandButton2.

Private Sub CommandButton1_Click()
Call test(1)
End Sub

Private Sub CommandButton2_Click()
Call test(2)
End Sub

In Module1 I declare two collections:

dim group1, group2 as New Collection

Public Sub test (a As Integer)
group1.Add UserForm1.TextBox1, "g1"
group2.Add UserForm1.TextBox2, "g2"

''I want to put in TextBox1 or TextBox2 value 1
''and I want to use collection of controls

group & i (1).Value="1" "is not correct but I need a solution for that

End Sub


--
stefantem
------------------------------------------------------------------------
stefantem's Profile: http://www.excelforum.com/member.php...o&userid=13594
View this thread: http://www.excelforum.com/showthread...hreadid=501008

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with data collection! brandon roland[_2_] New Users to Excel 1 August 8th 07 10:09 PM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
Error with passing collection as parameter McManCSU[_17_] Excel Programming 3 August 1st 05 06:19 PM
Collection Todd Huttenstine Excel Programming 4 December 17th 04 09:41 PM
2 Collection questions Stuart[_5_] Excel Programming 5 January 30th 04 04:50 PM


All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"