Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you have column headers on the destination sheet the data will be copied
on to the next row each time you run the code. If no column headers then a blank row will be left at the top of the sheet but after that the data will all be on the next available row. Note that a space and underscore at the end of a line is a line break in an otherwise single line of code. Private Sub CommandButton1_Click() Dim rngDest As Range 'Edit "Sheet2" to your destination sheet name With Sheets("Sheet2") Set rngDest = .Cells(.Rows.Count, "A") _ .End(xlUp).Offset(1, 0) End With With ActiveSheet .Range("A3").Copy _ Destination:=rngDest .Range("B5").Copy _ Destination:=rngDest.Offset(0, 1) .Range("C8").Copy _ Destination:=rngDest.Offset(0, 2) .Range("B11").Copy _ Destination:=rngDest.Offset(0, 3) End With End Sub -- Regards, OssieMac |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
multi cells selected | Excel Programming | |||
multi line cells | Excel Programming | |||
multi line caption on command button?? | Excel Programming | |||
multi function cells | Excel Discussion (Misc queries) | |||
Multi Select Cells | Excel Programming |