-
I'm trying to control the text in some textboxes at run-time using the IF THEN feature. I want to know how i can control how the text is displayed in the text boxes. For example,
if combo2.text = qtr1 then
text1.text = "ACTUAL 3/31/00"
I want the word ACTUAL on one line and the 3/31/00 on the line underneath. I would like to center both. Is this possible? Thanks
-
A normal textbox doesn't allow you to center text. You could use a richtextbox, though. Or if the user doesn't need to be able to change it, how about a label?
Toot
-
Actually, a regular textbox WILL let you center text, but ONLY if the Multiline property is set to true (if Multiline is False, then the Alignment property has no effect; the text is always aligned left). Toot's label suggestion is good if the user doesn't need to change the text. In response to your orignal question, you could do this:
set the Multiline property to True
set the Alignment property to Center
In code:
Text1.Text = "ACTUAL" & vbNewLine & "3/31/00"
-
Thanks! Got it to work using both methods.