Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,074
- Office Version
- 2019
- Platform
- Windows
I found this code that seems to allow me to achieve my objective, however, I can't seem to figure out how I can use this with a single click also. I would like to be able to single click an Arrow Shape object and move it 1 row down and double click the Arrow Shape to move to the last used row. Can
VBA Code:
Public LastClickObj As String, LastClickTime As Date
Sub ShapeDoubleClick()
Dim LRow As Long
LRow = Range("A" & Rows.Count).End(xlUp).Row
If LastClickObj = "" Then
LastClickObj = Application.Caller
LastClickTime = CDbl(Timer)
Else
If CDbl(Timer) - LastClickTime > 0.25 Then
LastClickObj = Application.Caller
LastClickTime = CDbl(Timer)
Else
If LastClickObj = Application.Caller Then
MsgBox ("Double Click")
Cells(Application.Max(7, ActiveCell.Row - 1), 1).Activate
LastClickObj = ""
Else
LastClickObj = Application.Caller
LastClickTime = CDbl(Timer)
End If
End If
End If
End Sub