ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Next line in header (https://www.excelbanter.com/excel-programming/291357-next-line-header.html)

Lee

Next line in header
 
I am adding headers to a worksheet using VBAs. Users are
prompted to enter the client's name in an input box, and
this info is added to the rest of the header. My problem
is that I want part of the information to be on a second
line in the header. I cannot figure out how to add a line
return in VBA. Can someone tell me how to do this?

Thanks, Lee

Vasant Nanavati

Next line in header
 
Line 1 & vbNewLine & Line 2

--

Vasant


"Lee" wrote in message
...
I am adding headers to a worksheet using VBAs. Users are
prompted to enter the client's name in an input box, and
this info is added to the rest of the header. My problem
is that I want part of the information to be on a second
line in the header. I cannot figure out how to add a line
return in VBA. Can someone tell me how to do this?

Thanks, Lee




Bob Phillips[_6_]

Next line in header
 
Lee,

Use vbCrLF constant

x= "something" & vbCrLf & " else"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Lee" wrote in message
...
I am adding headers to a worksheet using VBAs. Users are
prompted to enter the client's name in an input box, and
this info is added to the rest of the header. My problem
is that I want part of the information to be on a second
line in the header. I cannot figure out how to add a line
return in VBA. Can someone tell me how to do this?

Thanks, Lee





All times are GMT +1. The time now is 03:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com