Here is a useful (Simple) example of a dropdown list based on the selection from another if anyone is interested. The first example uses just the datasheet and the second uses a userform with a dropdown list:
Last edited by PRodgers; 06-15-2009 at 12:34 PM.
First point of call for info re:data validation would be Contextures:
http://www.contextures.com/xlDataVal01.html
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I dont seem to be able to open the matchimg combos2.zip file can you give me any advice
For the UserForm removing the need for Dynamic Named Ranges
Code:Option Explicit Private Sub ComboBox1_Change() Dim iCol As Integer If Me.ComboBox1.ListIndex > -1 Then iCol = Me.ComboBox1.ListIndex + 2 With Sheet1 Me.ComboBox2.List = .Range(.Cells(2, iCol), .Cells(2, iCol).End(xlDown)).Value End With End If End Sub
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks