我需要更改什么,因此当我单击A5时,焦点应更改为B3,所以当我单击B5时,焦点应更改为C3,依此类推...。
所以我现在的代码是:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("A5:D5"), Target) Is Nothing Then
Range("A3").Select
End If
End Sub
因此,当我从A到D选择第5行时,该点将移至A3 ..而不是A3,我想更改为第3行的下一列。
谢谢
可能:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("A5:D5"), Target) Is Nothing Then
Application.EnableEvents = False
Target.Offset(-2, 1).Select
Application.EnableEvents = True
End If
End Sub
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句