Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having trouble with "vbcr"


When I use "vbcr" in trying to display text in text boxes and cells
Instead of my text being moved to the next line, the carriage retur
symbol is printed and I have only one continous line. Here is sampl
code of what I tried:

msg = worksheets("sheet1").range("a3")
worksheets("sheet2").range("c7") = msg + vbcr + "Balance sheet"

I'm attempting to move whats in "a3 sheet1" to "c7 sheet2" and add
line under that says "balance sheet"

Please help

Thanks
Terr

--
terrysoper197
-----------------------------------------------------------------------
terrysoper1973's Profile: http://www.excelforum.com/member.php...fo&userid=3016
View this thread: http://www.excelforum.com/showthread.php?threadid=49843

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Having trouble with "vbcr"

Use vbLf instead of vbCr.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"terrysoper1973"
<terrysoper1973.216h2s_1136491811.8662@excelforu m-nospam.com
wrote in message
news:terrysoper1973.216h2s_1136491811.8662@excelfo rum-nospam.com...

When I use "vbcr" in trying to display text in text boxes and
cells,
Instead of my text being moved to the next line, the carriage
return
symbol is printed and I have only one continous line. Here is
sample
code of what I tried:

msg = worksheets("sheet1").range("a3")
worksheets("sheet2").range("c7") = msg + vbcr + "Balance sheet"

I'm attempting to move whats in "a3 sheet1" to "c7 sheet2" and
add a
line under that says "balance sheet"

Please help

Thanks
Terry


--
terrysoper1973
------------------------------------------------------------------------
terrysoper1973's Profile:
http://www.excelforum.com/member.php...o&userid=30161
View this thread:
http://www.excelforum.com/showthread...hreadid=498434



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having trouble with "vbcr"


Previous post was solved with vblf instead of vbcr, but won't work with
textboxes

'works with cells but not with text boxes
msg = worksheets("sheet1").range("a3")
worksheets("sheet2").range("c7") = msg + vblf + "Balance sheet"

If I want to do the same thing, but using a textbox for the
destination, how is it done.

'displays vbcr or vblf code
Private Sub cb1_Click()
msg = Range("b2") + vbLf + "balance sheet"
'works with range
'Worksheets("sheet2").Range("a1") = msg
'doesn't work with textbox
Worksheets("sheet2").TextBox1.Text = msg
End Sub

One more try please, just using a textbox, and I'll get out of your
hair.
Terry


Please help

Thanks
Terry


terrysoper1973
View Public Profile
Send a private message to terrysoper1973
Find all posts by terrysoper1973
Add terrysoper1973 to Your Buddy List


--
terrysoper1973
------------------------------------------------------------------------
terrysoper1973's Profile: http://www.excelforum.com/member.php...o&userid=30161
View this thread: http://www.excelforum.com/showthread...hreadid=498434

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Having trouble with "vbcr"

terrysoper1973 wrote:
Previous post was solved with vblf instead of vbcr, but won't work with
textboxes


vbcrlf :)
Reply
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
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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
trouble "locking" a portion of a formula.. avworld Excel Programming 2 July 6th 05 03:45 PM


All times are GMT +1. The time now is 01:46 AM.

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

About Us

"It's about Microsoft Excel"