Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Help with populating new combobox with list of ranges

I need to populate a new combobox with a list of ranges. I have one
combobox that works with one range "Main" but I have 4 other ranges on
the worksheet that I need to inlcude. So for example, I will choose the
range "Main" with one combobox and the data from the rowsources will
show up on the userform text box part. Is there a simple way to add a
second combobox for the additional ranges ? Here is my current code
below: Assuming I can get some guidance, I will be creating a second
combobox for the ranges.. thanks for any help..

Private Sub ComboBox1_Change()
'If we're initialize then all txt boxes are blank, don't write
If Not Initialize Then
SaveRow
End If

'Set current row
lCurrentRow = ComboBox1.ListIndex + 6

'LoadRow based off new current row
LoadRow
'Load TextBoxes
Set rng = Range(Range("Main").Offset(3), _
Range("Main").Offset(3).End(xlDown))
'Range(ComboBox1.RowSource)
txtReqNum.Text = rng(ComboBox1.ListIndex + 1)(1, 1)
txtDateOpen.Text = rng(ComboBox1.ListIndex + 1)(1, 2)
txtType.Text = rng(ComboBox1.ListIndex + 1)(1, 4)
txtPriority.Text = rng(ComboBox1.ListIndex + 1)(1, 5)
txtTitle.Text = rng(ComboBox1.ListIndex + 1)(1, 6)
txtGrd.Text = rng(ComboBox1.ListIndex + 1)(1, 7)
txtExpected.Text = rng(ComboBox1.ListIndex + 1)(1, 10)
txtNR.Text = rng(ComboBox1.ListIndex + 1)(1, 11)
txtManager.Text = rng(ComboBox1.ListIndex + 1)(1, 12)
txtDept.Text = rng(ComboBox1.ListIndex + 1)(1, 13)
txtRecr.Text = rng(ComboBox1.ListIndex + 1)(1, 14)
txtStatus.Text = rng(ComboBox1.ListIndex + 1)(1, 15)
txtCandidate.Text = rng(ComboBox1.ListIndex + 1)(1, 16)
End Sub

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
.AddItem list and populating combobox with created list pallaver Excel Discussion (Misc queries) 8 June 27th 08 12:36 PM
Populating a list box with specific ranges Graham Whitehead Excel Programming 2 August 2nd 06 02:09 PM
Populating a ComboBox in a UserForm I Maycotte[_5_] Excel Programming 2 June 27th 06 06:28 PM
Populating a ComboBox DirInfo Excel Programming 1 March 17th 05 10:03 PM
populating one list/combobox based on the results of another Tim[_39_] Excel Programming 1 December 6th 04 04:53 PM


All times are GMT +1. The time now is 07:14 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"