+ Reply to Thread
Results 1 to 5 of 5

listbox on userform not showing specific cells

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Post listbox on userform not showing specific cells

    hi
    just had 2 hrs trying to sort this one out on my userform frmmfrsa it has 2 instances of listbox column widths not sure which one its using
    it has first 6 columns on it now want column 16 or posted and no others,
    the other form frmmfrsanew which is a copy of first form has cost missing,but i presume if first one can be sorted id just do same for this
    have tried 15,67,78,ect and 56;67;78 ect, anyone can tell me which its using please
    cheers colin
    Attached Files Attached Files
    Last edited by cfinch100; 02-23-2013 at 01:25 PM.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: listbox on userform not showing specific cells

    of what i can see, your userform intialise code set the listbox to 7 columns
    but your cmdsearch code doesnt change the columns

    you could try to set the columns
    just add


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: listbox on userform not showing specific cells

    Your code is setting the columnCount to 7 but your ListBox properties have the column count set to 16.
    You need to Dim Data as range
    At the end of your code you are clearing the control

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: listbox on userform not showing specific cells

    hi sean
    thanks for that but does not do what i need lists few more , ive deleted ,put 0 as size but does not let me list a,b,c,d,e,f and q
    thanks though will keep trying
    cheers colin

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: listbox on userform not showing specific cells

    hi
    tried this one aswell comes up with this
    Please Login or Register  to view this content.
    and only lists 5 columns and no headers
    thanks for help though
    cheers colin

    it was this line in cmdsearch that was causing problem
    Please Login or Register  to view this content.

    have moved them all along and put 0,s for columns not wanted and now shows a to f and q which is posted
    thanks for help solved this one myself nearly a first
    cheers colin
    Last edited by cfinch100; 02-23-2013 at 01:24 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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