+ Reply to Thread
Results 1 to 13 of 13

Listbox not working in Excel 2013

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Listbox not working in Excel 2013

    Hello all,

    I have created a spreadsheet that contains a host of custom built features, one of them being a form that populates two Listboxes. The whole thing works perfectly in Excel 2010 but the moment I open it up in 2013 I get the following message "could not load some objects because they are not available on this machine" So I've gone as far as I could to load MSCOMCTL.OCX / FM20.DLL and tried to identify others from the references -VBAProject
    In Excel 2013 after the error the listboxes on the user form are not there and even if I exit without saving and then load the spreadsheet in excel 2010 they gone. I do keep a backup which I keep going back to in an effort to try resolve this.
    The next thing I tried was to just add the list boxes to the Userform - which is fine but then it fails on the properties of the ListBox:

    This is part of my code and it get's stuck on .ColumnHeaders.Clear

    Please Login or Register  to view this content.
    From what I can gather that the listbox in Excel 2013 doesn't contain the properties Columnheaders and the only one I find in ColumnHead but that doesn't work either.

    So now I'm stuck and if any one could help me I'd be most grateful
    And thank you in advance

    Darren
    Last edited by dghillza; 01-17-2014 at 10:00 AM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Listbox not working in Excel 2013

    That's because the code you've posted isn't for a listbox, it's for a listview. I think it would be much easier to convert your code to use a listbox for compatibility reasons - especially if you're not going to be the only one using it.

    P.S You need to use code tags as per the forum rules - you need to alter your original post

  3. #3
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    Thank you for the reply, apologies for not using the code tags - how do I go back and edit my original post?

    Yes you are right that is a ListView not a ListBox, so how do I resolve this in Excel 2013 - because it seems to be standard in 2010

    Thank you
    Darren

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Listbox not working in Excel 2013

    . Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    Ok fixed up my post - so I think my problem boils down to the listview so how do I get the listview to work in Excel 2013 - what is the add in file? hopefully once I add it and register it all will work

    Thank you

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

    Re: Listbox not working in Excel 2013

    Darren

    As far as I know the ListView control isn't standard in any version of Excel.

    If you use one in a workbook which is distributed to others then people who have no access to the control are going to have problems.

    Is there some reason you can't use a listbox?
    If posting code please use code tags, see here.

  7. #7
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    Hi Norie,

    Yes I developed this some time ago and the initial problem I encountered with a ListBox was that I couldn't have multiple columns in the list box with headings and the ListView solved this. The interesting thing is this was developed way back on excel 2003 and seemless worked on 2010 when I upgraded to office 2010 and windows 7 pro - now that I've gone to 2013 and window 8 I'm having these problems. If these is a way to solve this another way not using a ListView I'm open to suggestions.

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

    Re: Listbox not working in Excel 2013

    A listbox can have headers though you would need to populate it from a range.

  9. #9
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    Yeah I populate it from an Arrray because the data I want is only selective from a main table. Basically I have a dropdown list that provides some of the conditions of the data I want in the listview and based on those conditions I populate an array which then get added to the listview

  10. #10
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    What I have so far picked up is that MSCOMCTL isn't supported on 64 bit and that all what I've got installed so if that the case I may have to uninstall office and drop down to the 32bit version

  11. #11
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    Maybe I can try dump the array into another sheet and then use that range?

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

    Re: Listbox not working in Excel 2013

    Why not try a work around like having a listbox for the headers?

    That could be placed just above the listbox for the data and have the same column widths.

    Might sound a bit clunky but it actually works quite well.

  13. #13
    Registered User
    Join Date
    01-17-2014
    Location
    Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Listbox not working in Excel 2013

    I think I might just downgrade to the 32bit version of office found this:
    http://office.microsoft.com/en-au/su...102840825.aspx
    As I transport my spreadsheet to different machines with and use it on Excel 2010 & 2013 Re-coding and changing the way things are done may just open a hornets nest

+ 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. Working on Multiple Workbooks in Excel 2013
    By javaid in forum Excel General
    Replies: 1
    Last Post: 12-14-2013, 11:49 AM
  2. [SOLVED] Sort Data not working Excel 2013?
    By nobodyukno in forum Excel General
    Replies: 6
    Last Post: 08-14-2013, 10:31 AM
  3. Excel 2013 not Working on Windows 8 (Date & Time)
    By edison in forum Excel General
    Replies: 11
    Last Post: 06-23-2013, 09:59 AM
  4. Excel 2013 Conditional Formating not working
    By ExcelWombat in forum Excel General
    Replies: 3
    Last Post: 05-28-2013, 01:22 PM
  5. Link Excel 2013 to Word 2013
    By drosen99 in forum Word Formatting & General
    Replies: 20
    Last Post: 02-26-2013, 08:20 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