Ahh, I see what your problem is. The Split command is not returning a two dimensional array. Have a look at how many 'lines' you have after running the split command.
If you split a string containing carriage returns but don't use those CRs as the split trigger then the result will include those CRs in the middle of the array item. This means that
" ++ 105<CR>0 ++ " splits to become an item in the array which has a value of "105<CR>0"
I think you will find that this line is not doing what you expect it is
Lines = Split(Textline, vbNewLine)
If it was, would you see the value of lines(i) being as large as 20 paragraphs?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Last edited by Guessed; 09-14-2022 at 10:10 PM.
|