Share via

Restrict who can click a command button

Anonymous
2011-02-24T15:58:52+00:00

On a worksheet, it is possible to give certain users permission to edit a range even when the cells are locked and the sheet is protected (Review - Changes - Allow users to Edit Ranges).

Can a command button on a worksheet be set up in a similar way?

If not, how would I restrict who can press the button and therefore not have the associated code run?

Thanks.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2011-02-24T16:08:35+00:00

    You could check the username in the code run by the button. Or ask for a password.

    Was this answer helpful?

    0 comments No comments