+ Reply to Thread
Results 1 to 11 of 11

ArryLists for Multi-Column

  1. #1
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Post ArryLists for Multi-Column

    Good Morning,

    I'm trying to Frankenstein some code together to build a report-like userform.

    It works for what I need aside from only listing the information on a single column. Hows it setup is that a User can select a list of buttons , depending on what is selected the buttons are assigned a value that is sent to an assigned cell. Based on the value of that cell, the userform will filter the data. The way it is now, works for what I want so multiple people can pick up reports at the same time.

    If anyone knows a way to modify this allow the first column to be to be filtered but show the entire row. I'd truly appreciate it.

    The code;

    Please Login or Register  to view this content.
    Please let me know if I can provide any further details. i will not be able to send a copy of the workbook or sheet.
    Last edited by UnloadMe; 12-16-2020 at 12:18 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: ArryLists for Multi-Column

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then 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

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Re: ArryLists for Multi-Column

    Apologies. I'll fix that now.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: ArryLists for Multi-Column

    set column widths and number of columns in listbox
    failing that upload your file with dummy data in it.
    torachan

  5. #5
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Re: ArryLists for Multi-Column

    Sir/Ma'am,

    I have the Column Widths set on the ListBox1 properties and the Column Count also filled in.

    Is this what you were referring to?

    Thank you for the help.

  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: ArryLists for Multi-Column

    Where is the value from Sheet2.Range("AP6").Value coming from?

  7. #7
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Re: ArryLists for Multi-Column

    Norie-

    How its setup is that when the User goes to a main page they can click on a button that pulls up a directory.

    Each button in that directory has an integer value that changes another cell value. The Sheet2.Range("AP6").Value is a vlookup formula in a worksheet based on the button selected.

    The Sheet2.Range("AP6").Value is based based on fixed user list so they can't input anything different and keeps the loop closed. When the code above is ran it will clear that cell value to be ready for the next person. I set it up this so when it's shared, multiple people can pull a filtered list without seeing information that isn't pertinent to them.

    Thank you for the help

    Edit:

    This code was intended to use the TextBox.value inside the userform to filter the listbox. Instead of using the TextBox value, I moved it to a WorkSheet cell. Hopefully this helps

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: ArryLists for Multi-Column

    This line is only loading a single column from the array
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-15-2020
    Location
    Wyoming
    MS-Off Ver
    Current
    Posts
    5

    Re: ArryLists for Multi-Column

    Correct.

    I'm trying to get it to load multiple columns.

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: ArryLists for Multi-Column

    easier to answer - upload a desensitized workbook

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: ArryLists for Multi-Column

    UnloadMe,

    My guess...
    Please Login or Register  to view this content.

+ 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. Multi-column dropdown list using multi-column dynamic range (no VBA)
    By ysdai7287 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-04-2018, 03:59 AM
  2. Replies: 1
    Last Post: 12-26-2017, 11:48 PM
  3. Copy Multi Rows From Multi Sheets Based On Column Value And Create New Workbooks
    By Huskersippi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2017, 04:51 PM
  4. 1 column into multi-columns and multi-rows
    By affj in forum Excel General
    Replies: 7
    Last Post: 07-17-2013, 09:34 AM
  5. Replies: 19
    Last Post: 10-05-2012, 01:03 PM
  6. Multi-Column Listboxes correspond to multi textboxes
    By Crebsington in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2012, 01:38 PM
  7. Sum with Multi Criteria in Multi Column
    By markuss in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2010, 05:35 PM

Tags for this Thread

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