+ Reply to Thread
Results 1 to 13 of 13

Listbox as table, with a twist (query information system)

  1. #1
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Listbox as table, with a twist (query information system)

    Good day Excel gurus!

    I am working on with yet another Excel VBA project that requires display of information depending on user’s selection, basically the functionality of a query. My boss wants to have this come in as a userform-based interface.

    Here is the system:•I am developing a Competitive Analysis information system.
    •There is a table consists of multiple columns (in the original data I am working on, it has 55 columns) but for all intents and purposes of this example, I reduced it to 11.
    •Bear in mind that the table to the left (see attached Excel file) is a result of lookups (index-small-row formula combination), and therefore formula-driven. The main database is in separate sheet (no need to include in the attached file).
    •Based on the user's options in user form the display of data in list box

    Does it looks like I’m in a cutthroat situation? I would love to hear other workarounds to make the system simpler and easier to maintain and update.

    Competitive Analysis Sample System Flow.xlsm

    Hope to hear from you soon guys! Thanks in advance!

    EDIT: This issue was also posted to other forum via http://www.mrexcel.com/forum/excel-q...ml#post4212532. I am no longer expecting replies from this link. Instead, all your answers are welcome here in Excel Forum site. Thanks.
    Attached Files Attached Files
    Last edited by ykobure; 07-14-2015 at 04:31 AM. Reason: Adding link to cross-post forum

  2. #2
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    I am doing my own research and I stumbled upon a glimpse of hope via ColumnWidths property. By adjusting value to zero (0), I can just hide those columns that are not relevant to the selection. The thing is, the syntax only accepts string value.

    Please Login or Register  to view this content.
    I was hoping to add variables in it so that I can easily manipulate it depending on the checkboxes's values. Something like this:

    Please Login or Register  to view this content.
    Appreciate your inputs guys.

    Thanks in advance.
    Last edited by ykobure; 07-13-2015 at 07:02 AM.

  3. #3
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    Bumping this post up. Hope you can help me with this guys.

    Thanks!

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

    Re: Listbox as table, with a twist (query information system)

    Sorry, what's your actual question? The only one I can see is "am I in a cut throat situation?"?

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Listbox as table, with a twist (query information system)

    Hi ykobure,
    try this
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    Sorry, but my question/problem is that how can I display the contents of each column based on the check boxes selections in list box? As you can see in the attachment, there are check boxes that bear the same name of the worksheet's column heads. In the event that multiple options are placed (meaning more than 1 check box is ticked), the list box will adjusts accordingly.

    But feel free to suggest other workaround should you think that the way I am heading is a bit strenuous.

    Appreciate your help! Thanks.

  7. #7
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    @nilem, I'll give your suggestion a go and get back to you with the result. Thanks a lot!

  8. #8
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    Quote Originally Posted by nilem View Post
    Hi ykobure,
    try this
    Please Login or Register  to view this content.
    This is just insane @nilem! I don't know how your code works, but it works like a charm!

    One last thing, Can you also do some magic on the "Select Companies to Compare" section of the form. This will just display the company names being compared with their corresponding data. Judging by the way you code the first one, you might have a way around for this.

    Thank you sir, and a Reputation point from me to yours!

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

    Re: Listbox as table, with a twist (query information system)

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  10. #10
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    @nilem, just a follow up questions though. When I tried to add more check boxes (as I indicated in my original message above, I will be needing 55 of it), the column I prefer still displays correctly but the other columns no longer hide from view. That is column Q onwards of Sheet1. I studied your code but I cannot locate where it should be adjusted.

    Hope you can help me with this. I won't be asking for anything else if this one gets solved.

    Thanks in advance!

  11. #11
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    @Kyle, apologies for this non-compliance issue. I'll edit my post here right away.

    Thanks for the guidance!

  12. #12
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Listbox as table, with a twist (query information system)

    Try to rename your checkboxes like this
    Chb1, Chb2, ... Chb55
    And your code would look like this
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Manila, Philippines
    MS-Off Ver
    2019
    Posts
    102

    Re: Listbox as table, with a twist (query information system)

    You just saved my career, @nilem!! It now works perfectly! Thanks a lot.

+ 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. Setup a Query in a Table Based on Information in that Table
    By lwflip in forum Access Tables & Databases
    Replies: 1
    Last Post: 07-07-2015, 10:48 AM
  2. [SOLVED] Concatenate Query (with a twist)
    By Dave350z in forum Excel General
    Replies: 5
    Last Post: 02-03-2015, 03:48 PM
  3. Replies: 2
    Last Post: 01-29-2013, 01:25 AM
  4. Replies: 0
    Last Post: 12-05-2012, 03:48 PM
  5. Using excel in a clinical information system
    By adrianplunkett in forum Excel General
    Replies: 1
    Last Post: 12-02-2012, 03:18 PM
  6. Replies: 3
    Last Post: 03-27-2012, 06:23 PM
  7. [SOLVED] Web Query with a twist
    By JOSII in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2005, 10:06 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