Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
custom button to copy a few cells and paste on somwhere else
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)? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy/Paste custom Excel chart to Word/PowerPoint | Excel Discussion (Misc queries) | |||
why will my copy and paste button not work | Excel Worksheet Functions | |||
Macro to copy and paste into a custom filter | Excel Discussion (Misc queries) | |||
Macro for button - copy and paste rows | Excel Programming | |||
copy & paste command button | Excel Programming |