This code is used 28 times in my project. While it works, lRow appears to slow the process due to my poor development – many of the sheets have had data in cells well below the current used range.
Some of the sheets run thru Next rCur over 5000 rows during processing. I believe the process could be dramatically faster if the lRow could end at the actual used last row.
Background: The process starts with each formatted sheet cleared of all data. The sheets are then populated with data from a UserForm. The data is dynamic – sometimes there are as few as 10 rows, other times it could be 100 rows or more.
Before I completely replace these worksheets with new unused sheets, can someone suggest some code that stops at the actual last cell used in the current referenced sheet? All of my attempts have proven fruitless.
Some of the sheets run thru Next rCur over 5000 rows during processing. I believe the process could be dramatically faster if the lRow could end at the actual used last row.
Background: The process starts with each formatted sheet cleared of all data. The sheets are then populated with data from a UserForm. The data is dynamic – sometimes there are as few as 10 rows, other times it could be 100 rows or more.
Before I completely replace these worksheets with new unused sheets, can someone suggest some code that stops at the actual last cell used in the current referenced sheet? All of my attempts have proven fruitless.
Code:
lRow = rCur.Row
If lRow > 0 Then
“Do my stuff”
Next rCur