auto-sizing text boxes

T

Travis

I have an org chart with titles that are of drastically different lengths. Is
there any way to have each text box resize itself to the quantity of text?
Thanks!
 
M

Mark Nelson [MS]

Org Chart controls the size of each shape centrally. You can change the basic size by going to Organization Chart > Options in the menu.

For non-Org Chart shapes you can place the following formula into the Width cell of the shape:
=GUARD(CEILING(TEXTWIDTH(TheText),0.125))

This formula sets the width of the shape to the width of the text, but it rounds the width up to the next 1/8 inch for more consistency and prevents users from accidentally blasting the formula by resizing the shape.
 
G

ginger

For non-Org Chart shapes, how do you find and change the Width cell to
=GUARD(CEILING(TEXTWIDTH(TheText),0.125)). Is this the best way to set up a
cell that someone later will fill in information electronically. As they
fill in the information, I want the border of the shape to grow.

Thanks for any help
 
J

John Marshall, MVP

Open the shapes shapesheet (it's under the windows menu) and place that
formula in the Width cell in the Shape Transform section at the top of the
shapesheet.

- TheText is a special keyword and tells the shape to use the text that is
in the current shape.

- TEXTWIDTH(TheText) translates into the length of the text that is in the
shape.

- Ceiling just makes sure that the width is at least .125 in (just in case
there is no text)

- Guard protects the formula from accidental change.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
G

ginger

John,

Thank you for the response. I went to Windows and opened the shape sheet
and added the formula to the Width cell. I keep getting the response "error
in formulae". I really want to allow the height to grow with the text. I
also tried
=GUARD(CEILING(TEXTHEIGHT(TheText),1.0). Will this work?

Thanks
 

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