472,789 Members | 1,299 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

VERTICALLY Aligning Text in a Text Box

I have a rather large text box in a report. Sometimes the Control Source is one sentence. Sometimes the Control Source is a paragraph.

I want to keep "Can Grow" and "Can Shrink" both set to "No".

Given this, is there a way to VERTICALLY align the text in the text box? Excel calls this "Middle Align".

Attached Images
File Type: jpg Excel Middle Align.JPG (22.8 KB, 7748 views)
Feb 15 '12 #1
4 10456
ADezii
8,834 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. Const conCENTER As Byte = 2
  2.  
  3. Me![<Text Box Name].TextAlign = conCENTER
Feb 15 '12 #2
NeoPa
32,534 Expert Mod 16PB
Wouldn't that align it in the centre horizontally rather than vertically as requested ADezii?
Feb 15 '12 #3
smartchap
236 100+
Please see the following site
** Link removed **

it may be of help to you

I have modified the code for you as :

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command2_Click()
  2.   Label2.Caption = "This" & vbCrLf & "is a" & vbCrLf & "long" & vbCrLf & "label to" & vbCrLf & "see how it reacts to the centering"
  3.   Label2.Left = Picture1.Width / 2 - (Label2.Width / 2)
  4.  
  5. End Sub
Feb 16 '12 #4
ADezii
8,834 Expert 8TB
Wouldn't that align it in the centre horizontally rather than vertically as requested ADezii?
Oops, sorry about that, I guess I was 'misaligned'! (LOL)
Feb 16 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Edo van der Zouwen | last post by:
I have the following problem. On a website there's a (simple) feedback form. This is used also by Polish visitors who (of course) type Polish text using special characters. However, when I...
16
by: C.W | last post by:
I have a top box element that houses the web site title: #top_section { height: 20px; padding: 10px; text-align: left; background: navy; color: white; }
2
by: Iain Hallam | last post by:
Hi. I've got a few divs on a page that are positioned as "fixed". I now want my text to centre itself both horizontally and vertically. "text-align: center" on the body works for horizontal, but...
0
by: [Yosi] | last post by:
How can I change the selection text back ground color (ritchText). I successfully change the text color by : this.MessageRichTextBox.SelectionColor = Color.Red How can I change also the Back...
1
by: Suresh Tri | last post by:
Hi, I was trying to overload concat operator ||(text,text) such a way that it behaves like Oracle. i.e. I want 'abc' || null to return 'abc' instead of null. I know that it is not the expected ...
2
by: Johann Robette | last post by:
Hi, I'm trying to call the array_to_string function like this : SELECT array_to_string(array, '~^~') --> it comes directly from the doc. I get this error msg : ERROR: parser: parse error at...
4
by: David Garamond | last post by:
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do...
4
by: Greg Scharlemann | last post by:
I'm having difficulty getting the radio buttons to align vertically with one another and the header (1 2 3 4 5) at the top. Ideally each radio button will be directly below the one above it and...
2
by: Casimir | last post by:
What would be the correct way to align checkboxes and their labels, in your opinion? For example .... <td> <input type="checkbox" class="cbox" name="thisCheck" /> <label...
2
by: brixton | last post by:
Hello, I have an "accordion menu" where I want the structure to be like this for a menu item with "children" who are supposed to drop down when an "expand image" is clicked: <li> <span>some...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.