I do not know how to do this but (and you may already have realized this) try recording a macro and perform the task you are trying to immitate. Then check out the code and tailor it to your needs. I'd try but I dont have anything that uses a text box. Good luck.
Unfortunately, that probably won't work. The macro isn't likely to record anything of value. If anyone has an answer to this one, I'd love to know. I've run into this myself - actually, my problem was with a word-wrapped cell, but the solution might be similar... Rob
For now I think It can be done if I take the .text property of the textbox and search for the end of lines characters... but I rather like to use something like a line position or an index...
There will be end of line characters only where the user purposely started a new line ("hard return", by hitting Enter or shift-Enter), not where the text wrapped around to the next line ("soft return". Are you interested in finding only the hard returns, or both hard and soft? Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.