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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to make stretchy text boxes and lines

Status
Not open for further replies.

opti66

Technical User
Nov 8, 2001
1
JP
Let's say I have a text box, textbox1 it is set with a height of 2 cm. For layout purposes I have a line on its left hand side, line1, it is also set at height 2cm. The text box is set to expand with the amount of text. How can I get the line to stretch accordingly. I have tried and On Format for the section with

line1.height = textbox1.height

but it just sets it to be the 2cm height that the textbox is originally set at, and doesn't go with the stretched height of the box.
 
You need to look at the events sequence and 'timing'. I believe the Format event takes place when the section is 'started', before any actual changes are 'committed'. If my (faulty) memeory serves , the Print event occurs after the formatting and (again if ... faluty ... memory) would be a better choice.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Hi. Did you ever get this to work? I have a similar problem...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top