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: 61
Default populate 2 column listbox from one named range

I need to populate a listbox with two columns from a named range (which
changes based on a combobox selection). the named range will consist
of two columns as well. here is what I have right now thanks to Nigel:

Private Sub ComboBoxgroupHSS_Change()

Dim c As Range
With UserFormDesign
.ListBoxHSS.Clear
For Each c In Range(.ComboBoxgroupHSS.Value)
If Len(Trim(c.Value)) 0 Then .ListBoxHSS.AddItem c.Value
Next
End With

End Sub

The column count of the listbox is set to 2. this routine applies each
non zero cell from the range (regardless of column location) and puts
it into the first column of the listbox. I would like the first
column of the range to go into the first column of the listbox and
similarly the second column of the range into the second column of the
listbox. how is this done?

thanks

 
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
Ignore blank rows to populate custom drop down list column range vidtec Excel Programming 3 April 24th 06 07:27 PM
How to paste only certain columns from a listbox into a named range GH[_2_] Excel Programming 2 January 5th 05 12:40 PM
Populate 2-column ListBox with 2 non-contiguous columns Paul Martin Excel Programming 2 December 8th 04 01:45 AM
How to populate a multi-column activeX listbox on a spreadsheet with an ADO recordset quartz Excel Programming 1 May 3rd 04 10:13 PM
listbox not dsplaying all records in a named range Andy Excel Programming 4 April 30th 04 11:00 PM


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