发布网友 发布时间:2022-04-23 05:53
共1个回答
热心网友 时间:2023-10-17 14:02
Private Sub Worksheet_SelectionChange(ByVal Target As Range)点击单元格就触发功能,被点击的单元格的值为yes
附件有详细文档
追问请问能改成双击吗?追答Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Target.Value = "YES"
End Sub
只在C列就加判断
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 3 Then
Target.Value = "YES"
End If
End Sub