Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
With ActiveWindow.ActivePane
Z = (ActiveWindow.Zoom) / 100
dpi = ((((.PointsToScreenPixelsY(72) - .PointsToScreenPixelsY(0)) / 72) / Z) * 72)
X = Round(.PointsToScreenPixelsX(Target.Offset(, 1).Left) - 1 * (dpi / 100), 0)
Y = Round(.PointsToScreenPixelsY(Target.Top) + 2 * (dpi / 100), 0)
End With
Target.Value = Trim(Target.Value) & " "
ExecuteExcel4Macro ("CALL(""user32"",""SetCursorPos"",""JJJJJ""," & X & ", " & Y & ")")
ExecuteExcel4Macro ("CALL(""user32"",""mouse_event"",""JJJJJJ""," & &H2 & ", " & 0 & ", " & 0 & ", " & 0 & ", " & 0 & ")")
ExecuteExcel4Macro ("CALL(""user32"",""mouse_event"",""JJJJJJ""," & &H4 & ", " & 0 & ", " & 0 & ", " & 0 & ", " & 0 & ")")
End Sub