Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ALT-Enter in Excel

Status
Not open for further replies.

cslawtom

MIS
Sep 3, 2001
161
HK
Hi All,

I would like to place an ALT-Enter inside a cell of an Excel file. From the inkey(), I know that ALT-Enter equal to -/166. But how to convert in CHR(?)+CHR(?)?

The ALT-Enter forces to go to next row inside a cell of an Excel worksheet. I need to place more than one row inside a cell. Therefore I need to place ALT-Enter.

Thanks in advance
 
In excel you do hit Alt+Enter to add a carriage return and linefeed into the cell, but I would say you can probably just put them in as:

chr(13) + chr(10)

...I could be wrong. Slighthaze = NULL
 
Hi Slighthaze,

It works but put only chr(10) is enough. If with chr(13), a rectangle box will be appeared.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top