av8tordude
06-28-2020, 09:15 PM
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 event 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.
Xross post: https://www.mrexcel.com/board/threads/double-click-shape-objects.1138536/
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
Xross post: https://www.mrexcel.com/board/threads/double-click-shape-objects.1138536/
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