Split is the slowest thing since a stalled Morris minor. You are completely killing your ram usage with that.
There's no use using split to count the lines when all you have to do is loop through and count the number of vbLF's. This won't use any extra ram and will be infinitely faster.
You can get the total lines and the current cursor line in a single loop, the column position will be the difference between the absolute cursor position and the position of the vbLF just to the left of the cursor.
Easy peasy.
I'll let you have a go at coding that yourself first.





Reply With Quote