VBA

Excel 2007, determine count of rows in a spreadsheet

I had to determine how many rows are in a speadsheet with VBA. Dim rowCount as Integer rowCount = ActiveSheet.UsedRange.Rows.Count

Excel 2007, determine count of worksheets in a spreadsheet

  If you need to know how many worksheets in a spreadsheet. Dim sheetCounter as Integer sheetCounter = ThisWorkbook.Worksheets.Count