+ Reply to Thread
Results 1 to 3 of 3

How do i change Combobox to be dependent on Command Button?

  1. #1
    Registered User
    Join Date
    09-19-2021
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    15

    How do i change Combobox to be dependent on Command Button?

    I'm trying to make a form that when you click a commandbutton, the dropdown options for a combobox will change but im not very sure how to do it.

    eg. When M1cmb (command button) is selected, the dropdown options of the combobox will be B39:B35

    Here is my code
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: How do i change Combobox to be dependent on Command Button?

    Hi shuxin,

    The code needs to be on each button, not the combobox i.e.

    Please Login or Register  to view this content.
    I take it that you're aware that the range for M1cmb (which you have the wrong way around) overlaps the range for singtelcmb?

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    09-19-2021
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    15

    Re: How do i change Combobox to be dependent on Command Button?

    Dear Robert,

    Thank you so much for your help! This totally works. Thank you so much!

    Regards,
    shuxin

+ 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. [SOLVED] How do I change combobox to be dependent on OptionBox
    By shuxin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2021, 01:46 AM
  2. Creating dependent command button
    By cpyter in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-28-2015, 02:57 PM
  3. Automating command button for time dependent data acquisition
    By janczar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2015, 03:36 AM
  4. [SOLVED] Enable Dependent Command Button
    By AmirSoft in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2015, 11:24 PM
  5. How to run macro based on Combobox and command button?
    By laxminarayana in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2014, 12:29 PM
  6. Combobox used before Command Button verification
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2013, 09:40 AM
  7. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 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