getting error while comparing two check boxes in vba macro

  • I have two checkboxes, the first checkbox is associated with first-person and the second checkbox is associated with the second person who is a reviewer. When checkboxes are checked, it should fetch the user name and the current time. Also, When only first checkbox is checked, sheet will be not be protected but if the second checkbox is checked, sheet should get protected. this is working fine.

    [Blocked Image:]

    but if I want to put some conditions as below, it is giving error. Conditions are:

    1. If the first checkbox is unchecked but the second is checked, the sheet should remain protected.
    2. If the first checkbox is checked but the second is unchecked, the sheet should get unprotected.
    3. both the checkboxes are unchecked, the sheet should get unprotected.

    PLease help. Any kind of help will be very appreciated. thank you!

Participate now!

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