View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
William Benson[_2_] William Benson[_2_] is offline
external usenet poster
 
Posts: 230
Default Copy method crashed Excel somtimes

How did you get this to work when wsDestination is undefined??


"davidm" wrote in
message ...

Your code works fine for me. Let me however observe that you could do
with some simplification, weeding out the intermediate assignments.
See:

Sub copyOver()

Dim n As Long

n = Sheets("GRADE").Cells(Rows.Count, 2).End(xlUp).Row
Sheets("GRADE").Range("B12:F" & n).Copy
Sheets(wsDestination).Range("B12")

End sub


--
davidm
------------------------------------------------------------------------
davidm's Profile:
http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=399357