Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Add a filtered range to a multicolumn ListBox

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Add a filtered range to a multicolumn ListBox

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
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
Populate a Multicolumn ComboBox with filtered range [email protected] Excel Programming 3 February 16th 07 01:52 AM
Multicolumn Listbox Value to Spreadsheet chris[_2_] Excel Programming 2 November 15th 06 05:49 PM
MultiColumn ListBox, linked to a range - select cells Spencer Hutton Excel Programming 1 March 20th 05 12:12 AM
Multicolumn Listbox with variable range dht[_2_] Excel Programming 4 January 11th 05 06:18 PM
Multicolumn Listbox and ordinary listbox Ron_D Excel Programming 0 June 4th 04 08:56 PM


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