Insert new line in label caption?

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

I want to dynamically build column heading labels in VB code so there are
potentially 3 lines in the heading. E.g. The (ls_Heading1)
Sales (ls_Heading2)
Totals (ls_Heading3)

If my code looks like this ColHeading.Caption = ls_Heading1 & vbLf &
ls_Heading2 & vbLf & ls_Heading3, then my column caption text looks like
this

The
<little box>
Sales
<little box>
Totals

Is there a way to do what I want to do?
 
Laurel said:
I want to dynamically build column heading labels in VB code so there are
potentially 3 lines in the heading. E.g. The (ls_Heading1)
Sales (ls_Heading2)
Totals (ls_Heading3)

If my code looks like this ColHeading.Caption = ls_Heading1 & vbLf &
ls_Heading2 & vbLf & ls_Heading3, then my column caption text looks like
this

The
<little box>
Sales
<little box>
Totals

Is there a way to do what I want to do?


Use vbCrLf, rather than vbLf.
 
Back
Top