novel
New Member
- Joined
- Jan 16, 2012
- Messages
- 39
The code that is causing the issue is this
visibleEnd is the last row of a filtered range. rngFiltered is the filtered range. it is defined as follows
sname is a variable to hold the sheet name
In the debugger, the xlDown = -4121 and the entire statement is 1048576, the variable itself is 0 since the error 6 Overflow is occurring.
I'm filtering for blanks and replacing them with a value. The number of rows in my worksheets vary from 200 to 90k+. In this particular instance the number of rows is 7043. There is only blank and it is on this last row in a particular column.
This error only occurs when there is only one row that is returned when the filter executes.
Code:
visibleEnd = rngFiltered.Range("A1").End(xlDown).Row
visibleEnd is the last row of a filtered range. rngFiltered is the filtered range. it is defined as follows
Code:
Set rngFiltered = Sheets(sname).AutoFilter.Range.Offset(1,0).SpecialCells(xlCellTypeVisible)
sname is a variable to hold the sheet name
In the debugger, the xlDown = -4121 and the entire statement is 1048576, the variable itself is 0 since the error 6 Overflow is occurring.
I'm filtering for blanks and replacing them with a value. The number of rows in my worksheets vary from 200 to 90k+. In this particular instance the number of rows is 7043. There is only blank and it is on this last row in a particular column.
This error only occurs when there is only one row that is returned when the filter executes.