+ Reply to Thread
Results 1 to 8 of 8

How To Print from Multi-Select Listbox Using Named Ranges

  1. #1
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    How To Print from Multi-Select Listbox Using Named Ranges

    Hi all,

    in the attached dummy file is a userform listbox (multi-select) that displays months of the year for 2019 and 2020 (set using the rowsource property). What I'm trying to achieve is a printout from those multiple selections using named ranges on a specific sheet (Roster).

    I think the problem is with syntax in the userform initialise section _ I don't know whether to use listindex, listcount, listitem or listselected to specify what named ranges the listbox items should refer to - they all seem to throw up a type mismatch error.

    Could someone point me in the right direction?

    Cheers,
    AJ
    Attached Files Attached Files
    Last edited by ScotyB; 02-06-2019 at 01:53 AM. Reason: to mark as solved...
    Always grateful for the help here - thanks.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    You can't populate a listbox using RowSource and List.

    Which named ranges do you want to associate with the dates in the RosterRange?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    Norie,

    I'd like first item in the listbox to be associated with named range "Alpha" on the Roster sheet, the 2nd item to be associated with named range "Bravo", and so on...

    Cheers,
    AJ

  4. #4
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    One upwards bump before I let this one go...

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    How about this one.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    Thanks, bakerman2,

    that worked a treat on the dummy test file - I'll try it on my actual work file when I'm back at work in a few days and let you know.

    Thanks for taking a look.

    Cheers,

    AJ

  7. #7
    Forum Contributor
    Join Date
    08-04-2010
    Location
    Adelaide, Australia
    MS-Off Ver
    Office 365
    Posts
    176

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    bakerman2,

    tested this on a work file today and no problems so far - thanks for your help.

    AJ

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: How To Print from Multi-Select Listbox Using Named Ranges

    Thanks for feedback and rep+.

+ 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. Print Items From Multi-Select Listbox
    By bobgodfrey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2017, 11:18 AM
  2. Multi-Select Listbox Help!
    By gclode in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2016, 11:14 AM
  3. [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
  4. [SOLVED] ListBox Multi-Select - Help
    By KyrieInfinity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 12:54 AM
  5. Multi-select listbox output.
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2011, 02:06 PM
  6. Multi-Select ListBox
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2011, 08:55 AM
  7. 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