lukieleetronic
lukieleetronic

Reputation: 623

VBA string - adding a newline of \n equivalent is not working

I've got the following VBA code extract,

series.Points(2).DataLabel.Text = "A:" & t1 & vbNewLine & "B:" & t2 

I was expecting the following output,

A:1
B:2

But I'm getting the following instead,

A:1

B:2

Where have I gone wrong?

Upvotes: 2

Views: 23583

Answers (1)

Ralph
Ralph

Reputation: 9444

Try this:

series.Points(2).DataLabel.Text = "A:" & t1 & chr(13) & "B:" & t2 

Upvotes: 4

Related Questions