ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vb Code (https://www.excelbanter.com/excel-programming/412739-vbulletin-code.html)

Excel Help!

vb Code
 
I have the following code in my macro; however, I wish to place a space
between two fields: FirstName LastName. The data prints out
"FirstNameLastName". Thanks for any help.

..Body = "text" $ cell.offset(0,-1).Value &
cell.offset(0,-2)&vbNewline&vbNewline&_

Jim Thomlinson

vb Code
 
Perhaps this...

..Body = "text" $ cell.offset(0,-1).Value & " " &
cell.offset(0,-2)&vbNewline&vbNewline&_
--
HTH...

Jim Thomlinson


"Excel Help!" wrote:

I have the following code in my macro; however, I wish to place a space
between two fields: FirstName LastName. The data prints out
"FirstNameLastName". Thanks for any help.

.Body = "text" $ cell.offset(0,-1).Value &
cell.offset(0,-2)&vbNewline&vbNewline&_


Excel Help!

vb Code
 
Worked Great! Looking for the hard answer. Thanks

"Jim Thomlinson" wrote:

Perhaps this...

.Body = "text" $ cell.offset(0,-1).Value & " " &
cell.offset(0,-2)&vbNewline&vbNewline&_
--
HTH...

Jim Thomlinson


"Excel Help!" wrote:

I have the following code in my macro; however, I wish to place a space
between two fields: FirstName LastName. The data prints out
"FirstNameLastName". Thanks for any help.

.Body = "text" $ cell.offset(0,-1).Value &
cell.offset(0,-2)&vbNewline&vbNewline&_



All times are GMT +1. The time now is 02:12 PM.

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