Obviously new to VBA.

I want to run a while function depending on the number of rows on a second sheet. ex..

a = 1
While a <= Sheet(2).rows.count
a = a + 1
...
this doesn't work. Any help. Thanks much.