Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



Reply
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
Can one combo box control the data in a different combo box MarkM Excel Discussion (Misc queries) 5 October 9th 06 11:44 AM
Combo Box & Array??? bobojen Excel Discussion (Misc queries) 2 April 17th 06 04:23 PM
Nesting Combo Boxes /Returning an Array ELMONDO SNITHER Excel Discussion (Misc queries) 1 June 30th 05 01:15 AM
data val. and combo box joe smith Excel Discussion (Misc queries) 1 March 24th 05 06:13 PM
Combo Box Data Jim Berglund Excel Programming 1 July 19th 04 11:27 PM


All times are GMT +1. The time now is 08:30 AM.

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"