I'm not sure why this is being so difficult, but for some reason I can't seem to count the number of rows in a given table. I keep getting an error which states:
Any help is appreciated. Code is below, and I'm using Excel 2007. Thanks in advance.
Run-time error '424':
Object required
Any help is appreciated. Code is below, and I'm using Excel 2007. Thanks in advance.
Code:
Sub QC()
Dim TableRows As Integer
TableRows = Activeworksheet.Tables("CAPEX").Rows.Count
End Sub