Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default adjust the height of a label

Hi all,

A label on my form will be filled by a muti-line of comment, the line number
is variable, so how to make the label adjust to it programmically.

Clara

thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default adjust the height of a label

Clara,

In Excel 2003, you can set the AutoSize property of the label to True.

--

Hope that helps.

Vergel Adriano


"clara" wrote:

Hi all,

A label on my form will be filled by a muti-line of comment, the line number
is variable, so how to make the label adjust to it programmically.

Clara

thank you so much for your help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default adjust the height of a label

Hi Vergel,

Thank you very much! Let's drill things down a little. Below the label,
there is a textbox, so when the label is growing automatically downwards, the
position of the textbox is also needed to shift down accordingly. How I can
do it?

Clara

thank you so much for your help


"Vergel Adriano" wrote:

Clara,

In Excel 2003, you can set the AutoSize property of the label to True.

--

Hope that helps.

Vergel Adriano


"clara" wrote:

Hi all,

A label on my form will be filled by a muti-line of comment, the line number
is variable, so how to make the label adjust to it programmically.

Clara

thank you so much for your help

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default adjust the height of a label

Clara,

Each time you change the contents of the label, you can push your textbox
down. As an example, the code below always puts TextBox1 5 pixes below
Label1.

Label1.Caption = strSomeReallyLongText
TextBox1.Top = Label1.Top + Label1.Height + 5

If you have more controls below the label that need to move down, consider
placing the controls in a Frame control. That way, you only need to move the
Frame and not have to worry about each individual control.

Label1.Caption = strSomeReallyLongText
Frame1.Top = Label1.Top + Label1.Height + 5



--

Hope that helps.

Vergel Adriano


"clara" wrote:

Hi Vergel,

Thank you very much! Let's drill things down a little. Below the label,
there is a textbox, so when the label is growing automatically downwards, the
position of the textbox is also needed to shift down accordingly. How I can
do it?

Clara

thank you so much for your help


"Vergel Adriano" wrote:

Clara,

In Excel 2003, you can set the AutoSize property of the label to True.

--

Hope that helps.

Vergel Adriano


"clara" wrote:

Hi all,

A label on my form will be filled by a muti-line of comment, the line number
is variable, so how to make the label adjust to it programmically.

Clara

thank you so much for your help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adjust cell height johncaleb Excel Discussion (Misc queries) 2 May 6th 10 11:55 PM
Automatic row height adjust ckemler Setting up and Configuration of Excel 1 December 22nd 09 05:26 PM
Adjust row height automatically Jinghui Excel Discussion (Misc queries) 0 May 8th 08 03:23 AM
Adjust Row height to FONT Joe[_47_] Excel Programming 2 October 19th 06 04:43 PM
HOW DO I ADJUST ROW HEIGHT BY PIXEL? western jet Setting up and Configuration of Excel 0 March 8th 06 08:44 PM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"