Results 1 to 3 of 3

Excel 2007 : Translate worksheet dropdown list actions to VBA for a userform

Threaded View

  1. #1
    Registered User
    Join Date
    12-24-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    89

    Translate worksheet dropdown list actions to VBA for a userform

    Morning

    On the attached sheet, the idea is to select a state from the first dropdown list. then the second dropdown list is populated with the cities of the state selected. The third dropdown list is populated with the airports associated with the city selected.

    Works fine.

    Instead of the dropdown lists being on a worksheet, I would like to have a userform with comboboxes for the State, City, and Airport. Then on the worksheet D11:D13 would be filled with the selections from the userform.

    The problem is that I have no idea as to how to code in VBA the actions of the worksheet dropdown lists.

    Data validation for the dropdown lists:

    The state: = a range named States
    The city: =INDIRECT(B3)
    The airport: = INDEX(Sheet1!$P:$P,MATCH(Sheet1!$C$3&"|"&Sheet1!$D$5,Sheet1!$N:$N,0),1):INDEX(Sheet1!$P:$P,MATCH(Sheet1!$C$3&"|"&Sheet1!$D$5,Sheet1!$N:$N,0)+COUNTIF(Sheet1!$N:$N,Sheet1!$C$3&"|"&Sheet1!$D$5)-1,1)

    I would appreciate any help with the coding.

    George
    Attached Files Attached Files

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