Ihidan
Ihidan

Reputation: 568

VBA Label formatting

I am using label from tool box control to place and write a default text to my form. However I want to break line and I don't know how to do it.

I don't believe writing a paragraph on the caption field is the right way to customize my form, is it? Am I missing something?

Upvotes: 1

Views: 625

Answers (3)

chdelamo
chdelamo

Reputation: 26

You can use 'vbnewline' to move to the next line in the field, just make sure your label is sized properly so it will show.

Example: string = "Text" & vbnewline & "text"

will read:

Text

text

Upvotes: 0

Olle Sjögren
Olle Sjögren

Reputation: 5385

You could use something like the vbCrLf constant to update the caption by code:

Label1.Caption = "New" & vbCrLf & "caption"

Upvotes: 1

Newd
Newd

Reputation: 2185

When you are writing your text into your label press (Shift+Enter) to add a return carriage.

Upvotes: 1

Related Questions