Someone kindly gave me the code below to use.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LR As Long
If Not Intersect(Target, Range(Cells(Target.Row, "A"), Cells(Target.Row, "H"))) Is Nothing Then
LR = Sheets("Shopping Cart").Range("B" & Rows.Count).End(xlUp).Row
If LR < 2 Then LR = 2
Intersect(Rows(Target.Row), Columns("a:h")).Copy Destination:=Sheets("Shopping Cart").Range("B" & LR).Offset(1)
End If
End Sub
I would like to use this on a button instead of a double click. Not sure how to begin.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim LR As Long
If Not Intersect(Target, Range(Cells(Target.Row, "A"), Cells(Target.Row, "H"))) Is Nothing Then
LR = Sheets("Shopping Cart").Range("B" & Rows.Count).End(xlUp).Row
If LR < 2 Then LR = 2
Intersect(Rows(Target.Row), Columns("a:h")).Copy Destination:=Sheets("Shopping Cart").Range("B" & LR).Offset(1)
End If
End Sub
I would like to use this on a button instead of a double click. Not sure how to begin.