Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello.
I'm asking this question here because I'm not sure if there's a VBA property that would control this or not. Here's what I'm trying to do, and unfortunately I'm not that familiar with the ComboBox Properties in VBA. Essentially, I am using some ActiveX Comboboxes on a worksheet to emulate the AutoFilter commands on another sheet. I have been able to write all the proper procedures to do the filtering on all the pages. (Not a problem.) Where I run into trouble is when the Combobox is linked to a data list where multiple values are the same. For example, a list may contain values: 23 23 24 24 25 26 27 I only want unique values to show up in the Combobox (the same as they would in Excel's regualr AutoFilter function:) 23 24 25 26 27 I have gone through the Properties on the ComboBox itself, but there's nothing that limits this that I can find. Is there something in VBA itself that will force the ComboBox to display only unique numbers from the data list? I hope I'm making sense. Any help would be greatly appreciated. Thanks. Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You might consider not linking it to a data list, but instead read the data
list into an array, then process the array to rid it of the unwanted duplicates. Use the newly processed array as the combobox items. Bill Barclift "Dan Gesshel" wrote in message ... Hello. I'm asking this question here because I'm not sure if there's a VBA property that would control this or not. Here's what I'm trying to do, and unfortunately I'm not that familiar with the ComboBox Properties in VBA. Essentially, I am using some ActiveX Comboboxes on a worksheet to emulate the AutoFilter commands on another sheet. I have been able to write all the proper procedures to do the filtering on all the pages. (Not a problem.) Where I run into trouble is when the Combobox is linked to a data list where multiple values are the same. For example, a list may contain values: 23 23 24 24 25 26 27 I only want unique values to show up in the Combobox (the same as they would in Excel's regualr AutoFilter function:) 23 24 25 26 27 I have gone through the Properties on the ComboBox itself, but there's nothing that limits this that I can find. Is there something in VBA itself that will force the ComboBox to display only unique numbers from the data list? I hope I'm making sense. Any help would be greatly appreciated. Thanks. Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dan,
Take a look at John Walkenbach's web site. Tip 47 is called "Filling a ListBox With Unique Items" http://j-walk.com/ss/excel/tips/tip47.htm hth, Doug "Dan Gesshel" wrote in message ... Hello. I'm asking this question here because I'm not sure if there's a VBA property that would control this or not. Here's what I'm trying to do, and unfortunately I'm not that familiar with the ComboBox Properties in VBA. Essentially, I am using some ActiveX Comboboxes on a worksheet to emulate the AutoFilter commands on another sheet. I have been able to write all the proper procedures to do the filtering on all the pages. (Not a problem.) Where I run into trouble is when the Combobox is linked to a data list where multiple values are the same. For example, a list may contain values: 23 23 24 24 25 26 27 I only want unique values to show up in the Combobox (the same as they would in Excel's regualr AutoFilter function:) 23 24 25 26 27 I have gone through the Properties on the ComboBox itself, but there's nothing that limits this that I can find. Is there something in VBA itself that will force the ComboBox to display only unique numbers from the data list? I hope I'm making sense. Any help would be greatly appreciated. Thanks. Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Viewing combobox properties | Excel Discussion (Misc queries) | |||
using properties | Excel Discussion (Misc queries) | |||
TextColumn Properties of ComboBox | Excel Discussion (Misc queries) | |||
Tab Properties | Excel Worksheet Functions |