Goal: A variable should contain amount of rows from a specific sheet.
Problem: What syntax code in Excel VBA do I need to count amount of rows from sheet?
You can also try:
i = Sheets("SheetName").UsedRange.Rows.Count
However, this can get a little buggy if you start deleting and clearing rows.
A better way to do this is:
i = Cells(Sheets("SheetName").Rows.Count, 1).End(xlup).Row
This assumes that each row has data in column 1.