Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cell text displayed in a single line

Status
Not open for further replies.

sandoztek

Programmer
Aug 20, 2008
27
FR
I want a text string put into a cell to be displayed in a single line, that is extended to the right, without the cell width being modified.
Currently, the width remains unchanged but the cell height is increased to contains the whole text.
Which format must be applied to this cell to have this result?
I thought .wrapText=false would work but it doesn't.
 
You can force text to wrap using Alt-Enter. I wonder if your text has the resultant special character (code=10) in it?

Gavin
 
Alt-enter is a manual operation, I want it to be done by program, when the cell is filled with the string.
Also, I DON'T WANT the wrap, just a single text line.
................
ok, I found the problem :
I did use the right property .WrapText = False
but it must be applied to the cell AFTER it has been filled, not before....
 
You will only be able to get single line text in a non wrapped cell if

a: The length of text is less than the width of the cell

or

b: There is nothing in the cell to the right of where the text is entered

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top