B
BGCSOCAL
I'm working on VS 2005 with Excel 2003. I need to set the range for the
entire sheet, but I do not know the number of rows in use for the
spreadsheet. I tried this:
oRng = oSheet.Range("A1").EntireColumn
TotRows = oRng.Count
TotRows ended up 65,5xx. Not useful. I really don't need to set a range, I
just need to know how many rows are being used. I need to programmatically
scan down the first column to see if a particular string is there and if it
is go process the next 5 rows or so. To do this, I need the total number of
rows in use. Shoulod I just give up and search all 65K rows?
Does anyone know how to do this?
entire sheet, but I do not know the number of rows in use for the
spreadsheet. I tried this:
oRng = oSheet.Range("A1").EntireColumn
TotRows = oRng.Count
TotRows ended up 65,5xx. Not useful. I really don't need to set a range, I
just need to know how many rows are being used. I need to programmatically
scan down the first column to see if a particular string is there and if it
is go process the next 5 rows or so. To do this, I need the total number of
rows in use. Shoulod I just give up and search all 65K rows?
Does anyone know how to do this?