+ Reply to Thread
Results 1 to 6 of 6

Listbox multiselect- VBA code error

  1. #1
    Registered User
    Join Date
    10-06-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Listbox multiselect- VBA code error

    I'm a bit of a beginner at using visual basics to code. I have inserted an activex listbox into my sheet. Its is multiselect. I want the selectiong to be inserted into a single cell on a seperate sheet. I have found the code to do it and had it working on my Excel 2007 at home but i opened it at work on Excel 2010 and I get the error 'Compule error: cannot find project or library"
    I can't work out what the error is. this is the code I have written:

    Please Login or Register  to view this content.
    Would anyone be able to point out where I have gone wrong.
    Thanks so much
    Last edited by sassy1978; 10-08-2013 at 07:21 PM.

  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: Listbox multiselect- VBA code error

    The code might not be the problem.

    Open up the VBA Editor (ALT+F11), goto Tools>References...

    Is there anything marked as 'MISSING'?

    PS Can you use code tags when posting code?
    Last edited by Norie; 10-07-2013 at 10:14 PM.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-06-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Listbox multiselect- VBA code error

    Yes it Says "MISSING Microsoft Calendar Control 2007"


    Sorry about not using the Code tags

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

    Re: Listbox multiselect- VBA code error

    Try unchecking Microsoft Calendar Control 2007 and then try the code again.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Listbox multiselect- VBA code error

    Hi sassy1978

    Calendar Control no longer is included in Excel 2007 and later. There are available non ActiveX options that are fairly easily implemented.

    If interested I'll work with you.

    Edit:

    Fix your Code Tags!!
    Last edited by jaslake; 10-07-2013 at 10:59 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Registered User
    Join Date
    10-06-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Listbox multiselect- VBA code error

    Thank you for your help Tha worked.

    I have one other issue howerever.I have several multiselect listboxes boxes and I want the user to be able to select from these listboxes and have the results inputted into a single cell. However with the code i have it will only allow the reults from one listbox to be displayed. Is ther a way for this to be done. here's my code

    Please Login or Register  to view this content.
    Thank you

+ 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. Copy Selected items from multicolumn, multiselect listbox to another listbox
    By Willigb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2013, 11:27 AM
  2. How to adapt this listbox code when multiselect is enabled?
    By Kimberley in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-02-2011, 02:00 PM
  3. Listbox (MultiSelect)
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2008, 11:58 PM
  4. Multiselect Listbox use
    By RKS in forum Excel General
    Replies: 1
    Last Post: 05-12-2006, 10:10 AM
  5. [SOLVED] Bug in multiselect listbox?
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2006, 04:45 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