VBA code to check whether a Check Box is checked or unchecked

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Hi all,


    I am trying to use the check boxes from Forms.


    I have inserted check boxes and i have code that executes based on whether these check boxes are checked or unchecked.


    What would be the macro code that i need to use for achieving this.


    I tried something like

    Code
    If ActiveSheet.Shapes("Check Box 1").Value = xlOn Then
            'Code to be executed


    But, i get an error while executing the macro that says:


    Run-time error '438':


    Object doesn't support this property or method.


    Please help.
    Thanks

  • Re: VBA code to check whether a Check Box is checked or unchecked


    Oh!!!!


    I was going wrong in the syntax...


    Thank you very much for your help.


    Now it works great


    Cheers :)
    Yogesh

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!