+ Reply to Thread
Results 1 to 4 of 4

Can't Trigger a Macro When a ComboBox is Changed

  1. #1
    Registered User
    Join Date
    12-02-2021
    Location
    PA, USA
    MS-Off Ver
    Office 365
    Posts
    20

    Question Can't Trigger a Macro When a ComboBox is Changed

    I inserted a standard Excel combo box form control in a worksheet. I'm trying to trigger a macro when this value is changed, but I can't get Worksheet_Change(ByVal Target As Range) to recognize the action/change. I tried multiple things, and currently have;
    Please Login or Register  to view this content.
    But like I said the code isn't even being triggered when the box is changed. What am I doing wrong? Thanks!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,758

    Re: Can't Trigger a Macro When a ComboBox is Changed

    Worksheet_Change only works for cells, not controls.

    If you want a Form control to trigger a macro, right-click on the control and then Assign Macro.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: Can't Trigger a Macro When a ComboBox is Changed

    you need to assign a macro to the form control (see module) - gives the actions on the sheet.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  4. #4
    Registered User
    Join Date
    12-02-2021
    Location
    PA, USA
    MS-Off Ver
    Office 365
    Posts
    20

    Re: Can't Trigger a Macro When a ComboBox is Changed

    That worked, thank you!

+ 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. Trigger an event when any cell in a column is changed
    By scrabtree23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2020, 10:05 AM
  2. Replies: 2
    Last Post: 06-27-2018, 01:42 PM
  3. ComboBox values source being changed based on another combobox selection in a UserForm
    By stephenanderson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2016, 11:12 PM
  4. Content in combobox is changed after running macro (It should not)
    By Cashgenerator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2015, 09:30 PM
  5. ComboBox's HIGHLIGHTED ROW to TRIGGER Sub
    By excelV3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2015, 12:07 AM
  6. "How to trigger one combobox to another combobox
    By suresz449 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2011, 04:06 AM
  7. Prevent automatic combobox event trigger
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2006, 04:00 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