ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dynamic size of label, and depending on size label position of tex (https://www.excelbanter.com/excel-programming/428347-dynamic-size-label-depending-size-label-position-tex.html)

noord453

dynamic size of label, and depending on size label position of tex
 
Hi, I am creating a form, which reads depending of a choice from an excel
worksheet the value for label caption, right next to this label a textbox is
shown. Because the size of the label caption is dynamic, the position of the
textbox must shift left or right on order to read the complete label caption.
By doing so the size of the form might also need to change. How to create
such? there are 10 possible labels and textboxes, which are shown depending
on the choice. This last part is already working.

Regards
Gerard

Jacob Skaria

dynamic size of label, and depending on size label position of tex
 
Try setting the below property of Label

AutoSize property to True
OR
WordWrap property to True
--
If this post helps click Yes
---------------
Jacob Skaria


"noord453" wrote:

Hi, I am creating a form, which reads depending of a choice from an excel
worksheet the value for label caption, right next to this label a textbox is
shown. Because the size of the label caption is dynamic, the position of the
textbox must shift left or right on order to read the complete label caption.
By doing so the size of the form might also need to change. How to create
such? there are 10 possible labels and textboxes, which are shown depending
on the choice. This last part is already working.

Regards
Gerard


noord453

dynamic size of label, and depending on size label position of
 
Jacob,

Thx

Gerard

"Jacob Skaria" wrote:

Try setting the below property of Label

AutoSize property to True
OR
WordWrap property to True
--
If this post helps click Yes
---------------
Jacob Skaria


"noord453" wrote:

Hi, I am creating a form, which reads depending of a choice from an excel
worksheet the value for label caption, right next to this label a textbox is
shown. Because the size of the label caption is dynamic, the position of the
textbox must shift left or right on order to read the complete label caption.
By doing so the size of the form might also need to change. How to create
such? there are 10 possible labels and textboxes, which are shown depending
on the choice. This last part is already working.

Regards
Gerard


Jacob Skaria

dynamic size of label, and depending on size label position of
 
I am not sure is that what you are looking for ...

OR

another way is to get the maximum width of label control and then resize the
form to fit all other controls using

Me.TextBox1.Move ,,,,
UserForm1. Move ,,,,


If this post helps click Yes
---------------
Jacob Skaria


"noord453" wrote:

Jacob,

Thx

Gerard

"Jacob Skaria" wrote:

Try setting the below property of Label

AutoSize property to True
OR
WordWrap property to True
--
If this post helps click Yes
---------------
Jacob Skaria


"noord453" wrote:

Hi, I am creating a form, which reads depending of a choice from an excel
worksheet the value for label caption, right next to this label a textbox is
shown. Because the size of the label caption is dynamic, the position of the
textbox must shift left or right on order to read the complete label caption.
By doing so the size of the form might also need to change. How to create
such? there are 10 possible labels and textboxes, which are shown depending
on the choice. This last part is already working.

Regards
Gerard



All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com