Excel VBA 鼠标事件

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Endrow As Single
Dim myTarget As Range
Endrow = Cells(65525, 8).End(xlUp).Row
Application.EnableEvents = False
Set myTarget = Target
    myTarget.Copy
    Cells(Endrow + 1, 8).Select
    ActiveSheet.Paste
    Application.EnableEvents = True
End Sub

  

posted @ 2018-06-11 13:27  编程老头  阅读(3830)  评论(0编辑  收藏  举报