custom button to copy a few cells and paste on somwhere else
Hi OMID
I assume you want to add the items at the end of the data on the Report
Sheet. Draw a button on the sheet with the data then add the code below
(modify as necessary).
Private Sub CommandButton1_Click()
Dim lngRow As Long
Dim R As Range
Set R = ActiveSheet.Range("B2:E5")
With Worksheets("Report Sheet")
lngLastRow = Cells.SpecialCells(xlCellTypeLastCell).Row
.Range(.Cells(lngLastRow + 1, 2), .Cells(lngLastRow + 2, 5)).Value =
R.Value
End With
End Sub
--
Tony Green
"OMID" wrote:
How can i build a custom button to copy a few specific cells (B3:E2) and
paste them to a list (MY LIST) in another worksheet(REPORT SHEET)?
|