excel 如何用VBA来实现双击某个单元格(A1)跳转到指定区域(B2:F18),注意是双击 不要单击。
展开全部
试试看下面这段代码:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count = 1 And Target.Row = 1 And Target.Column = 1 Then
Range(Cells(2, 2), Cells(18, 6)).Select
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count = 1 And Target.Row = 1 And Target.Column = 1 Then
Range(Cells(2, 2), Cells(18, 6)).Select
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$A$1" Then
Range("B2:F18").Select
Else
End If
End Sub
If Target.Address = "$A$1" Then
Range("B2:F18").Select
Else
End If
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询