If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Counting Rows
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 |
#2
|
|||
|
|||
Counting Rows
Buster,
Try declaring MyRowCount as Long rather than integer. -- HTH Bob Phillips "Buster" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|