Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
max max is offline
external usenet poster
 
Posts: 12
Default Populate combobox with visable rows only

I have a combobox where the rowsource property refers to a range on a worksheet

i.e. Sheet1!A:

However, I am using Autofilter to reduce this list. I would like only the visable rows on
Sheet1 to populate the rowsource property but it currently includes the hidden ones

Any ideas

Max
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populate combobox with visable rows only

You would have to remove the rowsource property and load the box with code
using additem. An alternative would be to copy the filtered data to another
location and point the rowsource at that.

there really is no reason to point the whole column. In the initialize
event

Private Sub Userform_Initialize()
With Worksheets("Sheet1")
set rng = .Range(.Cells(1,1),.Cells(1,1).End(xldown))
End With
ComboBox1.RowSource = rng.Address(external:=True)
End sub

--
Regards,
Tom Ogilvy


"max" wrote in message
...
I have a combobox where the rowsource property refers to a range on a

worksheet.

i.e. Sheet1!A:A

However, I am using Autofilter to reduce this list. I would like only the

visable rows on
Sheet1 to populate the rowsource property but it currently includes the

hidden ones.

Any ideas?

Max



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
How can I make the autosum refer to visable rows / filter? Maria[_2_] Excel Worksheet Functions 6 February 12th 08 12:18 AM
how to get Excel 07 combobox to populate from MS Access table? xz Excel Discussion (Misc queries) 0 November 20th 07 05:45 PM
Combobox list - only with rows that fit the criteria Vikram Excel Discussion (Misc queries) 0 July 28th 06 12:43 AM
How do i populate a text box according to selection in combobox? Steve Excel Worksheet Functions 0 April 13th 06 12:40 PM
Having data populate text boxes based on Combobox Value Todd Huttenstine[_2_] Excel Programming 1 November 10th 03 01:35 AM


All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"