Enter a linefeed in a label via VBA

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

I want to enter some text in a label control. The text that goes in the
control requires a line feed or carriage return. How would I do this?

I tried

Me!My_Control.caption = "Text123" & chr(10) & "Text 234"

but that does not work.

Is this possible?

Thanks
 
You need both a CR and an LF:

Me!My_Control.caption = "Text123" & Chr(13) & chr(10) & "Text 234"
 
Chuck,

A little shorter, you can actually replace the
chr(10) & chr(13)

combination with just:

vbCrLf

April
 
Back
Top