Consulting

Results 1 to 3 of 3

Thread: Help With Form

  1. #1
    VBAX Expert
    Joined
    Apr 2007
    Location
    Orlando, FL
    Posts
    751
    Location

    Help With Form

    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?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Expert
    Joined
    Apr 2007
    Location
    Orlando, FL
    Posts
    751
    Location
    That looks Good XLD.

    Thanks for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •