View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default Determining the row limit in a macro

This will count the number of rows available in whichever Excel version you
use. Hope this helps! If so, let me know, click "YES" below.

Sub CountRows()

Dim NumberOfRows As Long

NumberOfRows = Rows.Count
MsgBox NumberOfRows

End Sub
--
Cheers,
Ryan


"Phil Hibbs" wrote:

How can a macro determine what the maximum number of rows is in the
version of Excel that is running? I don't want to just hard-code
version numbers, and I don't want to use .end(xldown) either.

Phil Hibbs.
.