π±
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function endOfSheet(Optional targetSheet As Worksheet) As Long | |
'' returns the (actual) last row of the current sheet | |
' this is far better than using '65536' or whatever the current row size might be, | |
' especially since .xlsx has 2^20 (1048576), not 2^16. | |
If targetSheet Is Nothing Then | |
Set targetSheet = ActiveWorkbook.ActiveSheet | |
End If | |
endOfSheet = targetSheet.Rows.Count | |
End Function |
NewerOlder