Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I'm not really sure where this quest. belongs.....

Posted on 1999-01-05
3
Medium Priority
?
120 Views
Last Modified: 2010-05-03
0
Comment
Question by:groone
3 Comments
 

Expert Comment

by:DPickering
ID: 1454070
Use the TextWidth property of a Form to determine the width in pixels of some text for the Form's current font. For example:

Text1.Width = Form1.TextWidth("Blah")

Unless you're using Courier or some other fixed width font, you'll need to take into consideration the different widths for different strings even though they might be the same number of characters in length. If say the field's length is 5, I'd probably recommend finding the width of say 5 "W" or "M" (ie wide) characters to set the width of your text boxes to ensure that all of the text is visible.

Cheers,
Dave Pickering
0
 
LVL 3

Author Comment

by:groone
ID: 1454071
Nope, answer was provided.  Thanks.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 0 total points
ID: 1454072
Since the question is answered. It better to remove this question. It's also zero points so you can do it safely.

To provide a reader of this question with an answer:
use an label control with the autosize property set to true
label1.text = "Hello"
text1.text = label1.text
text1.width = label1.width

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question