none
Check Boxes - Event not being triggered - both form control and activeX control RRS feed

  • Question

  • Hi

    I am experiencing two separate issues with checkboxes that are ActiveX control or Form Control. Please help!

    ActiveX control:

    When the checkbox is added as an ActiveX control, and when the value of the linked cell (which is a named range) is updated via VBA code (true/false), the checkbox DOES NOT toggle and hence its related event (_Click event) does not trigger.

    Form control:

    When the checkbox is added as a Form control, and when the value of the linked cell (which is a named range) is updated via VBA code (true/false), the form checkbox DOES toggle BUT still the macro that is assigned to it does not run!!

    In both cases, if I manually check/uncheck the checkbox, then the event is triggered but not when I updated the value of the linked cell via VBA. Please advise.

    Monday, November 10, 2014 3:18 PM

All replies

  • The Form control macro does not run, that is the normal behavior.

    But the Click event routine of the ActiveX control does run... in any situation that I can think of.

    The question is what you did that is doesn't run? As simple as possible:

    Make a new file, add a named range same way as in your original file, add a checkbox, assign the named cell to the checkbox, add your code and test the behavior.

    If the issue persist, please upload your file on an online file hoster like www.dropbox.com and post the download link here.

    Andreas.

    Monday, November 10, 2014 5:27 PM
  • Really?!! I didn't know that form control macro would not sure and that it is a known "bug"!!

    For ActiveX control - I cannot really recreate by workbook since it has a ton of coding already done but the problem is that the value of the linked cell is updated via VBA but that does not change the state of the check box. It it toggles systematically, then I am sure that the Click event will run but that is not the case.


    Is there anyway where I can force the event to run?
    • Edited by ExcelVBADev Monday, November 10, 2014 6:29 PM
    Monday, November 10, 2014 6:28 PM
  • Is there anyway where I can force the event to run?

    Sure, use the Change event and call the Click event routine directly.

    If you want I can view your file, look into my profile for my mail address and instructions and send me your file.

    Andreas.

    Tuesday, November 11, 2014 8:08 AM