View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Double click cell to execute macro

here's one way:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim lLastRow As Long
If Target.Column = 1 Then
lLastRow = Range("A65535").End(xlUp).Row + 1
Target.EntireRow.Copy Destination:=Range("A" & lLastRow)
Cancel = True
End If
End Sub


--
Hope that helps.

Vergel Adriano


"JDaywalt" wrote:

Let's say I have a range of data in cells B1 thru Z100. In would like to
designate column A as the "selector" column, whereby a user could replicate
the chosen row by double-clicking in the column A next to the chosen row.
For example, if the user wants to replicate row 10, they would go to cell
A10, double-click, and it would copy/paste row 10 into row 11 (shifting the
other rows down to avoid overwriting them). Is this possible to do?