+ Reply to Thread
Results 1 to 3 of 3

Multi-select ListBox Displays Sheets Then Runs Code

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    16

    Multi-select ListBox Displays Sheets Then Runs Code

    Hello all,

    I have a Multi-select ListBox in a UserForm that lists all of my Sheet names. I want to be able to select more than one sheet and then have a button run some code that will fill the first available cell with data that is in the textboxes. I need to have the program do this for every sheet selected. I have attached the project. This one has got me stumped...

    Thank you.
    Attached Files Attached Files
    Last edited by Shea2288; 05-05-2016 at 03:27 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Multi-select ListBox Displays Sheets Then Runs Code

    I have renamed your textboxes to make it easier to know what they're for. See code updates in the UserForm module.

    The idea is to find the next available row for data, then copy the four textboxes into the corresponding cells in that row.

    You are going to have problems with data validation, though. Someone will type in "52" for a date or "May" for an amount. That is another thing for you to think about next.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-16-2014
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    16

    Re: Multi-select ListBox Displays Sheets Then Runs Code

    Awesome. Thank you. My next step is to add a 'History' section in the userform to help avoid duplicate entries etc. I've attached the updated form with the history section.

    I think I have an old program that checks for a proper date format so I might be able to use that code. Also, for amount I could make it numeric only. If you have any suggestions please feel free to suggest away.

    This will help me out greatly. Thanks again.
    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. code to sort data in multi select listbox
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2016, 06:20 AM
  2. [SOLVED] Unhide 2nd Listbox when condition is met in the 1st multi-select listbox
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2015, 09:58 AM
  3. [SOLVED] ListBox Multi-Select - Help
    By KyrieInfinity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 12:54 AM
  4. Multi-Select ListBox
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2011, 08:55 AM
  5. Multi select listbox code not working when 2 listboxes on sheet
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2010, 10:53 AM
  6. Listbox Multi Select
    By MikeT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2006, 03:30 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