+ Reply to Thread
Results 1 to 5 of 5

ListBox - Form vs ActiveX

  1. #1
    Registered User
    Join Date
    12-21-2010
    Location
    Virginia
    MS-Off Ver
    Excel 2003
    Posts
    5

    ListBox - Form vs ActiveX

    I have a dilemma - I need a list box that outputs the number of its selection, and can be toggled visible/not visible.

    The Form Control ListBox outputs the number of the option selected (In a list of states, selecting "Alaska" returns "2"). However, I cannot seem to make my CommandButton toggle its visibility.

    The ActiveX Control ListBox outputs the selection itself (Selecting Alaska returns"Alaska") and I cannot seem to run formulas based on it (=(A1="Alaska") returns FALSE instead of TRUE). I can, however, toggle its visibility with a command button:

    Please Login or Register  to view this content.
    I tried that code with a Form ListBox (I determined its name by assigning it a macro). "ListBox3.Visible = True" results in an error: Run-time error '424': Object required.

    So - I need one of the following (although learning them all is always awesome, too):

    - A way to make my ActiveX control output the number of its selection

    - A formula that can take the ActiveX selection into account (a boolean on the "State" selected)

    - Or a way to modify my above code to toggle the visibility of a Form ListBox

    Thoughts?
    Last edited by Roseus; 12-29-2010 at 12:09 PM.

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: ListBox - Form vs ActiveX

    Hi, and welcome to the board. Do you mean something like this one????
    Pls see attached
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    12-21-2010
    Location
    Virginia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: ListBox - Form vs ActiveX

    Quote Originally Posted by contaminated View Post
    Hi, and welcome to the board. Do you mean something like this one????
    I'm so sorry, but I can't open your file. My home computer is out for repair right now, and although this is for a work project, they have rules against downloading files off the net.

    If it's not too much trouble, would you mind breaking down what's contained therein?

  4. #4
    Registered User
    Join Date
    12-21-2010
    Location
    Virginia
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: ListBox - Form vs ActiveX

    Bump 10char

    Edit: I cross-posted my question to the thread below after I bumped this thread.

    http://www.mrexcel.com/forum/showthr...=1#post2557153

    Second Edit: Was then subsequently solved at the cross-posted forum.

    Solution was provided to toggle Forms ListBox using:

    Please Login or Register  to view this content.
    .
    Last edited by Roseus; 12-29-2010 at 12:09 PM. Reason: Added cross post

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,343

    Re: ListBox - Form vs ActiveX

    And also cross-posted here.

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved 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-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this
    Everyone who confuses correlation and causation ends up dead.

+ 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