Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Filtered Data for ComboBox

I am pretty green when it comes to VBA, actually very green. But what
am looking for is some idea of what some code would look like for th
following:

Say I have 6 options to choose from in the first ComboBox, however eac
of those options have 10 subsets. What I am looking for is code tha
will adjust the second ComboBox to show the correct subsets based o
the first selected data in the first ComboBox.

Anything would help, if my description is too confusing please tell me
Thanks to anyone who takes the time to help me

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Using Filtered Data for ComboBox

I put a couple of comboboxes from the control toolbox toolbar on a worksheet.

I put the listfillrange for the first combobox on a different sheet.

Then in the code for that first combobox, I had this:

Option Explicit
Private Sub ComboBox1_Change()

Dim myCell As Range

With Me.ComboBox2
.Clear
For Each myCell In Application.Range(Me.ComboBox1.ListFillRange)
If myCell.Text = Me.ComboBox1.Value Then
.AddItem myCell.Offset(0, 1).Value
End If
Next myCell
End With

End Sub



"cdos <" wrote:

I am pretty green when it comes to VBA, actually very green. But what I
am looking for is some idea of what some code would look like for the
following:

Say I have 6 options to choose from in the first ComboBox, however each
of those options have 10 subsets. What I am looking for is code that
will adjust the second ComboBox to show the correct subsets based on
the first selected data in the first ComboBox.

Anything would help, if my description is too confusing please tell me.
Thanks to anyone who takes the time to help me.

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
Return filtered values into report worksheet based on filtered valueon the data worksheet dicko1 Excel Worksheet Functions 1 April 21st 09 12:27 AM
MS2007 - deleting filtered data, deletes non-visible data too Nita Excel Discussion (Misc queries) 1 December 9th 08 03:42 PM
Help to sort out filtered data from the data contained in another sheet of the same workbook No News Excel Worksheet Functions 1 July 28th 06 04:04 PM
ComboBox data SSHO_99 Excel Worksheet Functions 2 March 15th 05 01:35 PM
ComboBox filtered on partial match? Ian Chappel[_2_] Excel Programming 5 September 14th 03 10:57 PM


All times are GMT +1. The time now is 06:57 AM.

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"