Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Userform - Formating Text in a Label

How do you vertically align text in a label on a userform?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Userform - Formating Text in a Label

I don't believe that Label controls support vertical alignment.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"TEB2" wrote in message
...
How do you vertically align text in a label on a userform?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Userform - Formating Text in a Label

What can I do to make my text look centered in the label? Mine looks like it
is top centered?

"Chip Pearson" wrote:

I don't believe that Label controls support vertical alignment.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"TEB2" wrote in message
...
How do you vertically align text in a label on a userform?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Userform - Formating Text in a Label

This came up recently in subject "CommandBar Caption Orientation" and Dave
Peterson suggested suggested:

"Separate each character by ctrl-enter (to force a new line)"

- which at the time I thought was a neat idea!

If your text has only one vertical line that should work for the label
caption.

Regards,
Peter T

"TEB2" wrote in message
...
How do you vertically align text in a label on a userform?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Userform - Formating Text in a Label

Hi Teb2,

What can I do to make my text look centered in the label? Mine looks like it
is top centered?


Use two labels, one for the background/border, one (transparent) for the text
and center them with code:

lblFront.Top = lblBack.Top + (lblBack.Height - lblFront.Height) \ 2

and the same for the left/width

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Label Steve[_9_] Excel Discussion (Misc queries) 7 October 29th 07 09:51 PM
Userform Label question David Goodall Excel Programming 2 October 29th 04 03:33 PM
Userform blinking label Ed Excel Programming 2 July 17th 04 12:24 AM
UserForm label doesn't load? Ed[_18_] Excel Programming 4 June 21st 04 07:53 PM
add text to label (label from forms toolbar) Rob Bovey Excel Programming 0 September 5th 03 09:46 PM


All times are GMT +1. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"