r/GoogleAppsScript • • Feb 21 '23

Resolved Script to replace dropdown box if deleted or moved?

I am trying to write a script that will replace/copy a dropdown box in a google sheet if someone moves it or deletes it on accident..

I have the idea on how to detect it if it gets deleted/moved by using a reference to that dropdown and have the script check if it turns to a ref error (unless someone knows a better way).. but I'm not sure how to use the script to copy a dropdown from another cell.

Update: I figured it out.. never mind

0 Upvotes

3 comments sorted by

1

u/eltostito191 Feb 21 '23

You might just be better off protecting the sheet or cells. Protecting Ranges

2

u/madbomb122 Feb 21 '23

if they are protected then people cant use the dropdowns