+ Reply to Thread
Results 1 to 3 of 3

ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    St. Louis, Missouri
    MS-Off Ver
    2013
    Posts
    10

    ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed

    I would like to create an ActiveX Command Button that will populate cells on one worksheet based off of data from a separate, hidden sheet (still in the same workbook though). However, I want the button to know to pull specific data depending on selections that were chosen in list boxes.

    For example: Let’s say someone is working in “Worksheet 1,” where 2 ActiveX List Boxes and 1 ActiveX Command button are located. If this individual chooses “Animal” in the first list box, then the second list box will display a following list of animals. Then, let’s say that person chooses “dog” in the second list box. I then want the ActiveX Command Button to recognize that someone chose both “animal” and “dog” in the two previous list boxes, and then when clicked, be able to pull data from a separate hidden sheet (“Worksheet 2”) to display on “Worksheet 1.” So, in other words the data for the selection “dog” would be hidden away from the individual, but when they choose “dog” in the second list box, and then click the ActiveX command button, then the data would appear.

    I already know how to write the code in VBA for dependent list boxes, but I am unsure on how to make an ActiveX Command Button dependent upon selections in a list box. Is this possible, and if so, can anyone provide me with a VBA code that I can use to fulfill my specifications? Furthermore, does anyone know a VBA code for an ActiveX Command Button that will pull data from one sheet, and display it on another? Any input is appreciated. Thanks!
    Last edited by Stlcards13; 05-26-2017 at 02:16 PM.

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

    Re: ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.


    To add a file to a post

  3. #3
    Registered User
    Join Date
    07-10-2015
    Location
    St. Louis, Missouri
    MS-Off Ver
    2013
    Posts
    10

    Re: ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed

    Working on getting that example Excel template attached, but having issues. Will get it ASAP.
    Last edited by Stlcards13; 05-26-2017 at 03:11 PM.

+ 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. ActiveX Command Button
    By kwrigh6 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-17-2015, 09:56 AM
  2. [SOLVED] Conditionally Hide or deactivate code in an activeX command Button.
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2014, 12:19 PM
  3. Replies: 5
    Last Post: 06-18-2014, 02:25 PM
  4. Run activex command button via macro
    By dhaval123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2013, 06:07 AM
  5. [SOLVED] ActiveX command button error on Mac!!!
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2013, 03:09 AM
  6. ActiveX Command Button Text Looks Bad
    By brownsl in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-07-2012, 07:35 AM
  7. [SOLVED] ActiveX command button
    By Dr.Schwartz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2005, 04:05 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