+ Reply to Thread
Results 1 to 3 of 3

UserForm Multiple Selection Listbox and Insert Row process Help 2013

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    UserForm Multiple Selection Listbox and Insert Row process Help 2013

    Good day.
    Hope this will make some sense. I have a userform that contains 1 listbox, and 3 textboxes.

    I need to have the following function and but all the help or questions found online doesn’t seem to help me at all.

    For each selection from my listbox I need to add the information but in a weird way. I will try to add a workbook with an example.

    When the user will generate the Userform There will be multiple selection in a listbox. The user will always select almost all of the selections. For each selection made I need to add 2 rows bellow. The initial row will be to have my Column B insert a name as “Total” and the one bellow “English” and the one bellow that “Others”. So if the user select 3 selection from the listbox, 9 rows total will appear and all will have a row with Total, English and Others.

    Now the textboxes:

    For each textbox needs to be inserted in the same row on all rows, Example If the user adds the same information from stated above, the information from my textbox must add itself to all rows, in this case Textbox1 will be column C, textbox 2, column D… and so on… I need to have place to add more textbox as this is incomplete information and would need help on the basic.

    Book1.xlsm

    Explanation would be appreciated as I am learning tricks everyday to become more and more VBA efficient Also that I have so much to learn.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: UserForm Multiple Selection Listbox and Insert Row process Help 2013

    See if this will get you started.

    You really should learn how to declare your objects. It will payoff in the long run.

    THere's no need to deselect the listbox items as you iterate the list. While if this instance, it won't cause any problems, if you ever have a listbox_click event, every time you deselect an item, would cause the click event to be called. Then you're chasing gremlins.

    I made the code dynamic on the course list. Meaning, you can add to it and the code will accommodate the extra class.

    HTH!
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: UserForm Multiple Selection Listbox and Insert Row process Help 2013

    This is exactly what I needed to start me with... Tinbendr thank you so much...

    Yes I am reading on up some Excel Training Course right now, Learning as I go to become more knowledge full in VBA cause that is where everything is going in my section.

    Thank you again.

+ 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. Call a userform from a listbox selection
    By seanpears99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2013, 03:49 AM
  2. userform listbox
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2013, 11:09 PM
  3. Selection Results from userForm (Multiple-Column listBox)
    By bstubbs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2012, 06:01 PM
  4. Dynamic chart selection from userform listbox
    By kmsoni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2011, 03:22 PM
  5. Populating a userform based on a listbox selection
    By hey1000 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-21-2010, 02:54 AM

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