ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multipul lines in a cell (https://www.excelbanter.com/excel-programming/279702-multipul-lines-cell.html)

Jim Peterson[_3_]

multipul lines in a cell
 
I was wondering if there is a way to make multiple lines in a cell using
visual basic. I know that in excel you can press ALT+ENTER and do this, but
I cannot figure it out using visual basic. Thanks in advance.
Jim



Paul D[_2_]

multipul lines in a cell
 
How about something like this
Cells(1, 1).Value = "first line text" & Chr(10) & "second line text"
Paul D

"Jim Peterson" wrote in message
...
I was wondering if there is a way to make multiple lines in a cell using
visual basic. I know that in excel you can press ALT+ENTER and do this,

but
I cannot figure it out using visual basic. Thanks in advance.
Jim





Tom Ogilvy

multipul lines in a cell
 
activecell.Value = "ABCD" & chr(10) & "CDEF"

format the cell to wrap text.

--
Regards,
Tom Ogilvy



Jim Peterson wrote in message
...
I was wondering if there is a way to make multiple lines in a cell using
visual basic. I know that in excel you can press ALT+ENTER and do this,

but
I cannot figure it out using visual basic. Thanks in advance.
Jim





excel

multipul lines in a cell
 
Hit ALT+ENTER


-----Original Message-----
How about something like this
Cells(1, 1).Value = "first line text" & Chr(10) & "second

line text"
Paul D

"Jim Peterson" wrote in message
. ..
I was wondering if there is a way to make multiple

lines in a cell using
visual basic. I know that in excel you can press

ALT+ENTER and do this,
but
I cannot figure it out using visual basic. Thanks in

advance.
Jim




.



All times are GMT +1. The time now is 05:26 PM.

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