how to select text in active cell?

T

turneg02

how to select text in active cell?
sometimes the cell has more than one line so it needs to be able to select
that aswell

thanks
 
D

Doug Robbins

Dim myrange as Range
Set myrange = Selection.Cells(1).Range
myrange.End = myrange.End - 1

myrange.Text will then contain just the text from the cell, the final line
of code having stripped off the end of cell marker which you probably do not
want.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top