
Hi @Cool_wanderer_Jeeva,
To share Office Scripts with users but prevent them from viewing the code, you can create script buttons that run the associated script when selected. This shares the script with the workbook, so everyone with write permissions to the workbook can use your helpful automation, but they won't be able to view the code. To remove the script from a button, you can go to the More options (…) menu in the script details page and select Stop sharing. This removes all the buttons that run the script. Deleting a single button removes the script from that one button, even if the operation is undone or the button is cut and pasted. It's important to note that script buttons won't work when opened in versions of Excel that don't support Office Scripts. In that case, the button still appears, but selecting it has no effect.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.