ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vblf and vbcr one last question (https://www.excelbanter.com/excel-programming/349648-vblf-vbcr-one-last-question.html)

terrysoper1973[_2_]

vblf and vbcr one last question
 

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
------------------------------------------------------------------------
terrysoper1973's Profile: http://www.excelforum.com/member.php...o&userid=30161
View this thread: http://www.excelforum.com/showthread...hreadid=498488


Chip Pearson

vblf and vbcr one last question
 
Use vbCrLf and ensure that the WordWrap and MultiLine properties
are both true.


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


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

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
------------------------------------------------------------------------
terrysoper1973's Profile:
http://www.excelforum.com/member.php...o&userid=30161
View this thread:
http://www.excelforum.com/showthread...hreadid=498488




terrysoper1973[_4_]

vblf and vbcr one last question
 

Every thing is working fine. Thanks for you help.

Terry


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



All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com