View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default Paste after print to a new line

Dave,

Thank you for catching this!!!

My goof when I did a copy/paste... (and than didn't catch it...)

--
steveB

Remove "AYN" from email to respond
"Dave Peterson" wrote in message
...
There is a typo on this line:

lrw = Sheets("Sheet2").= Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row

Change it to:

lrw = Sheets("Sheet2").Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row

chris100 wrote:

Hi SteveB,

When i try to run the below I get a Syntax Error for "Lrw=...." and i'm
not sure where the mistake might lie. I tried a few alterations but with
no luck. Please advise.

Chris

Sub bob()
Dim lrw As Long, cl As Long

' this gets the first open row on sheet2
lrw = Sheets("Sheet2").= Cells(Rows.COUNT, "A").End(xlUp).Offset(1,
0).Row

Sheets("Sheet2").Cells(lrw, 1) = Sheets("Sheet1").Range("A5")
Sheets("Sheet2").Cells(lrw, 2) = Sheets("Sheet1").Range("D25")
Sheets("Sheet2").Cells(lrw, 3) = Sheets("Sheet1").Range("T15")
Sheets("Sheet2").Cells(lrw, 4) = Sheets("Sheet1").Range("C18")

End Sub

--
chris100
------------------------------------------------------------------------
chris100's Profile:
http://www.excelforum.com/member.php...o&userid=25166
View this thread:
http://www.excelforum.com/showthread...hreadid=389755


--

Dave Peterson