Sheets("Source").Select
Rows("1:1").Select
Selection.Copy
Sheets("Print").Select
Rows("1:1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Source").Select
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Print").Select
Rows("1:1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
So, this is the sample code.
What I want to do is Copy each line from Source
Sheet and Paste to 1:1
rows in Print
Sheet automatically.
The range is different every time. It'll be great if the code works as rows number.
[2nd question] Alright, Now I got new problem. After I execute the code, Excel freeze.
here's the new code.
Dim i As Long 'i - Number of rows in Source list
NumRows = Range("A1", Range("A1").End(xlDown)).Rows.Count
For i = 1 To NumRows
Worksheets("Source").Rows(i).Copy
Worksheets("Print").Rows("1:1").PasteSpecial Paste:=xlPasteValues
Worksheets("Print").PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Next