PC Review


Reply
Thread Tools Rate Thread

Add a filtered range to a multicolumn ListBox

 
 
=?Utf-8?B?U3BlbmNlcg==?=
Guest
Posts: n/a
 
      22nd Jun 2007
I have a range("Products") with 4 coulmns of data. The range contains the
header row. The range will be filtered using standard auto filter by a
ComboBox on a userform. When the range is filtered, i need to be able to add
the filtered items to the multicolumn listbox and keep the header as the
listbox header. I can't get it to work right, tia.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?U3BlbmNlcg==?=
Guest
Posts: n/a
 
      22nd Jun 2007
in case anyone is curious, her's how i did it. listbox name = "lbProducts"

For r = 2 To Range("Products").Rows.Count
If Range("Products").Rows(r).Height <> 0 Then
With Me.lbProducts
.AddItem Range("Products").Cells(r, 1).Value
.List(.ListCount - 1, 1) = Range("Products").Cells(r, 3).Value
.List(.ListCount - 1, 2) = FormatCurrency(Range("Products").
_
Cells(r, 2).Value, 2)
End With
End If
Next

note this is 3 columns with the thirs being a dollar value.

"Spencer" wrote:

> I have a range("Products") with 4 coulmns of data. The range contains the
> header row. The range will be filtered using standard auto filter by a
> ComboBox on a userform. When the range is filtered, i need to be able to add
> the filtered items to the multicolumn listbox and keep the header as the
> listbox header. I can't get it to work right, tia.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill a multicolumn listbox with data from a range in another works =?Utf-8?B?RGFsZSBGeWU=?= Microsoft Excel Programming 1 12th Oct 2007 06:58 PM
Populate a Multicolumn ComboBox with filtered range jrperez.munloiza@gmail.com Microsoft Excel Programming 3 16th Feb 2007 01:52 AM
MultiColumn ListBox, linked to a range - select cells =?Utf-8?B?U3BlbmNlciBIdXR0b24=?= Microsoft Excel Programming 1 20th Mar 2005 12:12 AM
Multicolumn Listbox with variable range dht Microsoft Excel Programming 4 11th Jan 2005 06:18 PM
Multicolumn Listbox and ordinary listbox =?Utf-8?B?Um9uX0Q=?= Microsoft Excel Programming 0 4th Jun 2004 08:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 PM.