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

N

noord453

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
 
J

Jacob Skaria

Try setting the below property of Label

AutoSize property to True
OR
WordWrap property to True
 
J

Jacob Skaria

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
 

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