View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stephen Bullen[_4_] Stephen Bullen[_4_] is offline
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