Counting Rows

B

Buster

I tried to create a function to count rows used on a
worksheet and recieved an Overflow(Error 6) message.

Public Function UsedRange()
Dim MyRowCount As Integer
MyRowCount = Sheets("RWI").UsedRange.Rows.Count

End Function

Any ideas on why this message appears. Thanks in advance.

Best, Buster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top