Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I try to make the code so it copy the active cell and the next five cells below. The active cell copy works fine, but am not able to find a way to copy the hole range. The macro to loop through cells with contents: ----------------------------------------------------- Private Sub CommandButton1_Click() Sheets("Sheet2").Select Dim x As Range For Each x In Range("A5:M5") If Not IsEmpty(x) Then x.Copy Sheets("Sheet1").Select Run "kopiering" End If Next End Sub ------------------------------------------------------------- The macro that past the link value to the next sheet. Sub kopiering() Dim rngDestination As Range Set rngDestination = Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) rngDestination.Select ActiveSheet.Paste link:=True ---------------------------------- Thanks in advance Copy & paste developer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy range using last active cell reference from 1 wkb to another | Excel Programming | |||
Help: Macro Copy Active Cell to Range Name, loop | Excel Programming | |||
need to Copy or Move to active cell from specified range | Excel Discussion (Misc queries) | |||
To copy from a range in another sheet to the active cell | Excel Programming | |||
Macro Copy Active Cell to Range Name, loop | Excel Programming |