R
Randy Wiseman
I need to loop through all the rows in an MS Excel
Worksheet and would like to use a while construct like
below. The problem is that Worksheets().Range
().Rows.Count returns the maximum number of rows possible
instead of the actual number of rows. What am I doing
wrong?
MyRowCount = Worksheets("MySheet").Range("A").Rows.Count
while MyRowPtr < MyRowCount
examine the row
conditionally do some stuff
wend
Worksheet and would like to use a while construct like
below. The problem is that Worksheets().Range
().Rows.Count returns the maximum number of rows possible
instead of the actual number of rows. What am I doing
wrong?
MyRowCount = Worksheets("MySheet").Range("A").Rows.Count
while MyRowPtr < MyRowCount
examine the row
conditionally do some stuff
wend