+ Reply to Thread
Results 1 to 1 of 1

Userform ListBox depending on a previous Listbox selection

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2007
    Posts
    9

    Userform ListBox depending on a previous Listbox selection

    Dear all,

    I've created a userform with a lisbox in which appears all the Spanish districts. Once a district is choosen , I would like to generate a second Listbox to display all the cities of the choosen district with a command button.

    Userform with the listboxes shows off in the worksheet "Inicio" once clicked on "Espaņa".

    Data used for ListBox1 relies in the worksheet "Destinations".
    Column "B" holds the names of all districts for ListBox1.
    Column "C" holds the names of all cities for ListBox1.
    Column "C" holds the city names of district 1, Column "C" holds the city names of district 2, Column "D" holds the city names of district 3, and so on....

    My problem is I can`t figure out how to define the variable in order to generate a second userform with a Listbox2 linked to the first one. Until now, I only could insert the two Listboxes in the same userform.

    Anyone an idea how to write this VBA Code?

    Please find attached the XLSM document

    Thanks a lot in advance.

    Figolu
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] UserForm - How To Make TextBox Value Change Depending On ListBox Selection
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 05:05 PM
  2. [SOLVED] Indexing proper range in listbox depending on selection in previous listbox
    By bloodmeat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2013, 02:31 PM
  3. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  4. Userform Listbox Conditional on Previous Selection
    By gsurge in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-07-2011, 10:08 AM
  5. populate listbox based on selection in previous listbox
    By sarahng86 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2007, 10:55 PM

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