Results 1 to 6 of 6

How to create a Userform with dependant comboboxes?

Threaded View

  1. #1
    Registered User
    Join Date
    06-19-2008
    Location
    Las Vegas, NV
    Posts
    7

    How to create a Userform with dependant comboboxes?

    i have created a userform and the part I am having problems is with 3 combo boxes and 1 command box. The 3 combo boxes are using a drop down list Combo Box Type = 8 different parts, Combo Box Status = 3, and Combo Box Universal =3.

    comboboxtype= Pulling from the 8 different type of products 1 of these have to be selected.

    Comboboxstatus= Current, Out of Date and if nothing is entered in the master spreadsheet it is Blank

    comboboxuniversal= yes, no and if nothing is entered in the master spreadsheet it is blank

    how do i in VBE create the code to do a search based on
    type= new
    Status=Current
    Universal="blank" (nothing entered)

    The type is a worksheet that is in the master workbook and the status and universal are fields in the worksheets. Each worksheeet is layed out identical.

    This is what I have so far. I was able to get it to work by using a worksheet area and doing the drop down list based on that field

    Private Sub cmdContinue_Click()
    If Me.cboType.Value = "" Then
    MsgBox "Please Enter a Valid Platform.", vbExclamation, "Report Status"
    Me.cboType.SetFocus
    Exit Sub
    End If
    With Sheets(Range("A2").Value)
    .Range("A1:H" & .Cells(Rows.Count, 1).End(xlUp).Row).AdvancedFilter copytorange:=Sheets("reports").Range("A1:H1"), Action:=xlFilterCopy, criteriarange:=Range("B1:C2")
    End With
    End Sub
    I am checking in the first part to make sure something is entered in the cbotype box first. The other 2 boxes I dont really need to make sure that there is anything entered. the 2nd part of the code is looking up in A2 where I orginally entered the Cbotype info before i made a userform. and then was copying to a output spreadsheet and the range was B1:C2 which was.
    1 2 3

    A Type Universal Status
    B New Yes

    Any help is greatly appreciated
    Last edited by VBA Noob; 07-25-2008 at 02:46 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1