On Drag Cell Event

A

Anne

We are looking for an on drag event for dragging a cell/range. Is there one
as there does not seem to be many for a worksheet. If not can one be
created? If not why is this not exposed by Microsoft as clearly there is an
on drag event on a range.
 
H

Harald Staff

There is no such VBA available event. You can get a pretty good indication
if you combine selchange and change, like

'************************
Option Explicit

Dim R As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set R = Target
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If R Is Nothing Then Exit Sub
If Target.Address <> R.Address Then
If R.Count = Target.Count Then
MsgBox R.Address & " dropped at" & Target.Address
End If
End If
End Sub
'************************

HTH. Best wishes Harald
 
Top