录制宏虽然简单,但拓展性(可复用性)不强,它仅适合对同一事务的重复。这里我们就来写个简单的宏:向选中的单元格创建一条批注。内容类似 2021-5-29 By 表哥。
创建模块并重命名commentHere

写宏
/*** 向选中的单元格插入批注。*/function commentHere(){let targ = ActiveCell;let nowDate = new Intl.DateTimeFormat('zh-CN').format(new Date())let msg = `已审核-${Application.UserName}_${nowDate}`targ.AddComment(msg)}
执行

