View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to determine the height of a Range as an Integer

Is there a specific reason to loop through each cell in the range to copy it
to the other sheet? If you know the beginning and ending cells of your
source range, and the upper left cell of your destination range you can just
copy the cells right over.


Dim rngCopy As Range
Dim rngDest As Range

Set rngCopy = Worksheets("Sheet2").Range(Range("Cell1"), _
Range("Cell2"))
Set rngDest = Worksheets("Sheet3").Range("A1")

rngCopy.Copy rngDest



"TechWrangler" wrote:


Thanks for the quick response. I want to use this as my loop control
variable so I can loop through a varible size range and copy the
elements to another Worksheet. So it doesn't need to print. Would I
still use this?

Or would I do something like:

set r = Range ("CRP01")
Dim i = r.????
Dim crpCount = 2

For crpRow = crpCount To i
Code...
Next crpRow


--
TechWrangler


------------------------------------------------------------------------
TechWrangler's Profile: http://www.excelforum.com/member.php...o&userid=34244
View this thread: http://www.excelforum.com/showthread...hreadid=540004