PDA

View Full Version : Solved: Help With Form



Emoncada
06-16-2009, 08:48 AM
I have two CmbBox that need to work I believe as a Case.

Example
If CmbBoxModel.value = "2811" then (CmbBoxSN should be populated with a list from the "2811" Worksheet Range ("B3:End of List")

If CmbBoxModel.Value = "3560" then (CmbBoxSN should be populated with a list from the "3560" Worksheet Range ("B3:End of List")

Can this be done?

Bob Phillips
06-16-2009, 09:46 AM
Private Sub CmbBoxModel_Change()
Dim sh As Worksheet

With Me.CmbBoxModel

Me.CmbBoxSN.Clear
Select Case .Value

Case 2811:

Set sh = Worksheets("2811")
Me.CmbBoxSN.List = Application.Transpose(Range(sh.Range("B3"), sh.Range("B3").End(xlDown)))

Case 3560:

Set sh = Worksheets("3560")
Me.CmbBoxSN.List = Application.Transpose(Range(sh.Range("B3"), sh.Range("B3").End(xlDown)))
End Select
End With

End Sub

Emoncada
06-16-2009, 09:54 AM
That looks Good XLD.

Thanks for your help