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

  • 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!