View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
R.VENKATARAMAN R.VENKATARAMAN is offline
external usenet poster
 
Posts: 110
Default Programming Line Breaks into Cells

did you try something like this
range("a1")="raja" & chr(10) &"raman"


chr(10) is equivalent ot alt+ener
and did you get what you want.


TheVisionThing wrote in message
...
I'm writing resumes from a database field into individual single cells in

a
spreadsheet (one resume per cell). The problem is that line breaks in the
resumes are not being carried over into the single cells.

This is the function I'm using to correct this problem, but it's not
working.
-----------------------

Function ConvertTextAreaExcel(strText)
'inserts line breaks when displaying textarea data in an Excel cell
If strText < "" then
ConvertTextAreaExcel = Replace(strText, chr(13),vbCRLF)
End If
End Function
-----------------------
Thanks,
Wayne C.