![]() |
Using array data for combo box
Hi I have set up an array called arr which stores a multi dimentiona array. The macro used to get the array its data is calle testingmacro. I want to create a form with a combo box that uses th data in my array. So in the pull down menu it displayes all the first column of th array. When you select on of them it prints out the data in that ro of the array. Any idea how this would be done? Thx for you tim -- kanuva ----------------------------------------------------------------------- kanuvas's Profile: http://www.excelforum.com/member.php...fo&userid=2791 View this thread: http://www.excelforum.com/showthread.php?threadid=48421 |
Using array data for combo box
Here is an example.
What I am doing is building an array and loading that in the combobox. After selecting something in the combo, I use a combo to display an adjacent column. You will see that the extra columns do not display in the combo, but they are there. Private Sub CommandButton1_Click() With Me.ComboBox1 MsgBox .List(.ListIndex, 1) End With End Sub Private Sub UserForm_Activate() Dim ary ary = [{"Bob",56;"Lynne",49;"AMy",22;"Hannah",19 }] Me.ComboBox1.List = ary End Sub -- HTH RP (remove nothere from the email address if mailing direct) "kanuvas" wrote in message ... Hi I have set up an array called arr which stores a multi dimentional array. The macro used to get the array its data is called testingmacro. I want to create a form with a combo box that uses the data in my array. So in the pull down menu it displayes all the first column of the array. When you select on of them it prints out the data in that row of the array. Any idea how this would be done? Thx for you time -- kanuvas ------------------------------------------------------------------------ kanuvas's Profile: http://www.excelforum.com/member.php...o&userid=27911 View this thread: http://www.excelforum.com/showthread...hreadid=484214 |
All times are GMT +1. The time now is 11:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com