View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default UsedRange and LastCell feb08

If the usedrange starts in row 1, then the numbers will be the same.

with activesheet.usedrange
msgbox .row 'first row
msgbox .rows(.rows.count).row 'last row
msgbox .rows.count 'number of used rows
end with



Neal Zimm wrote:

Hi -
Am learning about some new to me worksheet properties.
I know the first example below is a count, but shouldn't the row numbers
be the same in both examples? Why are they not?
Thanks,
Neal Z.

debug.Print activesheet.usedrange.rows.count
5499

debug.Print activesheet.usedrange.specialcells(xlCellTypeLastC ell).address
$CW$5498


--

Dave Peterson