madkinson
Board Regular
- Joined
- Dec 17, 2004
- Messages
- 113
- Office Version
- 365
- Platform
- Windows
I have a macro that is attempting to return a value for the number of rows in the dataset:
Sub Sample_Used_Range()
Dim x As Long
x = Sheet1.UsedRange.Rows.Count
End Sub
Instead of returning a value of 217 for x, it returns a value of 65536. Will blanks rather than no data cause it to do that?
Sub Sample_Used_Range()
Dim x As Long
x = Sheet1.UsedRange.Rows.Count
End Sub
Instead of returning a value of 217 for x, it returns a value of 65536. Will blanks rather than no data cause it to do that?