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: 162
Default TextBox9.Text = Range("J:J") --- New line for each cell with a value?

Hello Fellow Programmers!

I am in need of some assistance with getting a text box to accept a
range of cells and put the contents of each value inside the textbox on
a seprate line...I have been messing around with some of the code and
managed to get it to work correctly however I know there is a better
code to use instead of the following...

TextBox9.Value = Range("J6") & vbLf & Range("J7") & vbLf & Range("J8")
& vbLf & Range("J9") & vbLf & Range("J10") & vbLf & Range("J11") & vbLf
& Range("J12")

My code in my dreams works like this...

TextBox9.Value = Sheet1.Range("J:J") & vbLf

vbLf would only apply to nonblank values...example below.

J1 = Value
NEW LINE (vbLf)
J2 = Value
NEW LINE (vbLf)
J3 = Empty
No Line


Thanks! Hope to get some feedback...

-Todd

 
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
how do I "keep text together" within a cell to keep it on 1 line? GT Photo Excel Discussion (Misc queries) 3 August 18th 09 04:34 PM
Combine text from multiple cells into one cell - =(A1&","&A2","&A3 mh Excel Worksheet Functions 5 July 27th 09 02:40 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Disabling "wrap text" neuters alt-return line feeds within cell [email protected] Excel Discussion (Misc queries) 2 August 21st 06 04:49 PM
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" Luc[_3_] Excel Programming 2 September 28th 05 08:37 PM


All times are GMT +1. The time now is 11:05 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"