[VBA] 鼠标点一下就加一
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
Dim targetRange As Range
Set targetRange = Range("B3:F3")
On Error GoTo toRenableEvent
If Not Intersect(Target, targetRange) Is Nothing Then
If Intersect(Target, targetRange).Count = 1 Then
Target.Value = Target.Value + 1
Target.Offset(1, 0).Activate
End If
End If
toRenableEvent:
Application.EnableEvents = True
Set targetRange = Nothing
End Sub
Source: ---
Disclaimer: The information in this webpage is shared by anonymous users from external online sources. We cannot guarantee its accuracy or truthfulness. Users should exercise caution and verify information independently.