通过选中复选框触发功能 [英] Trigger function by checking checkbox
本文介绍了通过选中复选框触发功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在第一栏中有一个带有复选框的工作表。我希望能够通过选中一个框来触发功能。现在,所有复选框都设置为false / unchecked。无论如何,是否需要通过选中一个框来触发事件?
I have a sheet with checkboxes in the first column. I would like to be able to trigger a function by checking a box. Right now all the checkboxes are set to false/unchecked. Is there anyway to trigger an event by checking a box?
推荐答案
下面的答案不是很多,但是会记录ONEDIT单击或取消选中复选框时。
The following is not much of an answer, but does log ONEDIT when clicking or unclicking a checkbox. Maybe it can be used as a start for something more complicated.
function onEdit(e){
if (e.range.columnStart == 1 && e.range.columnEnd == 1 && e.range.rowStart <= 2000) {
Logger.log('ONEDIT');
}
}
这篇关于通过选中复选框触发功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文