LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Returning newline from a function to a cell

I am trying to create a function that returns a string with a newline,
which when shown in a cell forces the cell to show on muliple lines as
if alt+enter was pressed.

Here is a test function I have tried....

Public Function getString() As String
getString = "hello" & vbLf & "worl"
end function

Unfortunatly, when I reference this function from within a cell in
excel it does not have the desired effect - it shows the new line as an
uprintable character (a rectangle appears in the cell), and the whole
string is shown on one string.

Anyone know what characters I should return from my function to get it
to display as a soft return in the cell?

Cheers,

Dave.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If Function returning 0 instead of cell value torana_girl77 Excel Worksheet Functions 4 May 6th 09 05:03 AM
newline Tree*Rat New Users to Excel 9 October 21st 08 05:19 PM
Insert newline in cell through formula (excel 2003) Bart Wouters Excel Worksheet Functions 2 July 23rd 07 04:04 PM
newline in a msgbox greenjellystar Excel Programming 7 May 10th 05 04:36 PM
DDE an Alt-Enter (Newline) character Ross Field Excel Programming 2 May 13th 04 04:12 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"