T
tskogstrom
I find following strange behaviour in Excel 2013. Using Ctrl-C the target range in Worksheet_Change is correct, but when I use Ctrl-X the target range in Worksheet_Change becomes the active cell only. Here are immediate window results:
Select a cell, Ctrl-C, select three other cells, and Ctrl-V:
Worksheet_SelectionChange's Target.Address: $A$4
Worksheet_SelectionChange's Target.Address: $B$4:$B$6
Worksheet_Change's Target.Address: $B$4:$B$6
Select a cell, Ctrl-X, select three other cells, and Ctrl-V:
Worksheet_SelectionChange's Target.Address: $A$4
Worksheet_SelectionChange's Target.Address: $C$4:$C$6
Worksheet_Change's Target.Address: $A$4
Worksheet_Change's Target.Address: $C$4
Worksheet_SelectionChange's Target.Address: $C$4
Following events used:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Debug.Print "Worksheet_SelectionChange's Target.Address: " & Target.Address
End Sub
Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "Worksheet_Change's Target.Address: " & Target.Address
End Sub
Is there any of you who know how to get the full selected range in Worksheet_Change?
Thanks,
Skogstrom
Select a cell, Ctrl-C, select three other cells, and Ctrl-V:
Worksheet_SelectionChange's Target.Address: $A$4
Worksheet_SelectionChange's Target.Address: $B$4:$B$6
Worksheet_Change's Target.Address: $B$4:$B$6
Select a cell, Ctrl-X, select three other cells, and Ctrl-V:
Worksheet_SelectionChange's Target.Address: $A$4
Worksheet_SelectionChange's Target.Address: $C$4:$C$6
Worksheet_Change's Target.Address: $A$4
Worksheet_Change's Target.Address: $C$4
Worksheet_SelectionChange's Target.Address: $C$4
Following events used:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Debug.Print "Worksheet_SelectionChange's Target.Address: " & Target.Address
End Sub
Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "Worksheet_Change's Target.Address: " & Target.Address
End Sub
Is there any of you who know how to get the full selected range in Worksheet_Change?
Thanks,
Skogstrom