Run Button for Script

72 views
Skip to first unread message

Dan Klinker

unread,
Jul 1, 2022, 12:35:28 PM7/1/22
to Google Apps Script Community
Hi all, 

I'm having issues trying to create a run button in Google Sheets for a script that I've written. I've followed the instruction online where I have created a text box and go to the assign script option and then type in the name of the function that I wish to run, but every time I do this I get an error message saying "function could not be found". I have tried using different names, followed examples online to the letter, but nothing appears to be working. It's as if Google Sheets isn't picking up the scripts I've written So, I don't know if it's a setting problem or if I need to deploy or publish my script? Can anyone help?

CBMServices Web

unread,
Jul 1, 2022, 1:59:10 PM7/1/22
to google-apps-sc...@googlegroups.com
Dan,

When you enter the name of the function, enter it with no parentheses or quotes. But make sure you preserve the case (Upper case or Lower case) exactly as function is defined in your script.

Also the function must be defined in the script that is attached to the spreadsheet, it can not be in a separate file or library.

Hope this helps.

On Fri., Jul. 1, 2022, 9:35 a.m. Dan Klinker, <daniel....@bmigroup.com> wrote:
Hi all, 

I'm having issues trying to create a run button in Google Sheets for a script that I've written. I've followed the instruction online where I have created a text box and go to the assign script option and then type in the name of the function that I wish to run, but every time I do this I get an error message saying "function could not be found". I have tried using different names, followed examples online to the letter, but nothing appears to be working. It's as if Google Sheets isn't picking up the scripts I've written So, I don't know if it's a setting problem or if I need to deploy or publish my script? Can anyone help?

Registered Office: BMI Group Holdings UK Limited, Thames Tower Reading RG1 1LX.
Company number: 09984607
VAT number. GB294008404 

This email, including any attachments, is for the sole use of the intended recipient(s), and may contain information that is confidential or legally protected. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information or any attachments is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender by return e-mail that you have received the message in error and delete it along with any attachments. Please note that the Internet is not a safe means of communication or form of media.

Whilst we have taken reasonable precautions to ensure that this e-mail and any attachment has been checked for viruses, we cannot guarantee that they are virus free and we cannot accept liability for any damage sustained as a result of software viruses. We would advise that you carry out your own virus checks, especially before opening an attachment.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/feabcabd-d760-4671-ad76-674e48dde2d2n%40googlegroups.com.

Luuk Spierings

unread,
Aug 12, 2022, 7:25:56 AM8/12/22
to Google Apps Script Community
I am having the same issue except it always used to work and since the 20th of july my script randomly get's this error. Is there a known fix for this?


Op vrijdag 1 juli 2022 om 19:59:10 UTC+2 schreef George:

cbmserv...@gmail.com

unread,
Aug 12, 2022, 7:10:51 PM8/12/22
to google-apps-sc...@googlegroups.com

The error happening randomly I have not seen with a simple setup as a button with a script.

 

Post a screenshot of the error message and if you can, make available a sample spreadsheet with the script (just make sure no personal info is in sheet) and we can take a look at what perhaps may be happening.

Reply all
Reply to author
Forward
0 new messages