By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,106 Members | 1,095 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,106 IT Pros & Developers. It's quick & easy.

microsoft.visualbasic.Left(string,n) in VB 2005

P: n/a
AWW
RichTextBox.Text = string & vbCR works but
if I extract a substring with microsoft.visualbasic.left
then vbCR stops working.
I can do F5 executes with/without the Left and the vbCr does/doesNot
work. Comment?
Jun 22 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The following code shows a vbCR in both strings for me.

Dim s, s1, s2 As String

s = "this is an example string"

s1 = Microsoft.VisualBasic.Left(s, 5) & vbCr
s2 = s & vbCr

MessageBox.Show(String.Format("[{0}] [{1}]", s1, s2))

"AWW" wrote:
RichTextBox.Text = string & vbCR works but
if I extract a substring with microsoft.visualbasic.left
then vbCR stops working.
I can do F5 executes with/without the Left and the vbCr does/doesNot
work. Comment?
Jun 22 '07 #2

P: n/a
GS
what if
s1 =s.substring(s,0,5) &vbcr
RichTextBox.Text = s1

or use vbcrlf?

No I have not tried
"ModelBuilder" <Mo**********@discussions.microsoft.comwrote in message
news:89**********************************@microsof t.com...
The following code shows a vbCR in both strings for me.

Dim s, s1, s2 As String

s = "this is an example string"

s1 = Microsoft.VisualBasic.Left(s, 5) & vbCr
s2 = s & vbCr

MessageBox.Show(String.Format("[{0}] [{1}]", s1, s2))

"AWW" wrote:
RichTextBox.Text = string & vbCR works but
if I extract a substring with microsoft.visualbasic.left
then vbCR stops working.
I can do F5 executes with/without the Left and the vbCr does/doesNot
work. Comment?

Jun 22 '07 #3

P: n/a
AWW
Thanks - yes it works. Made stupid prog mistake.

On Fri, 22 Jun 2007 09:52:59 -0600, "GS"
<gs**********************@msnews.Nomail.comwrote :
>what if
s1 =s.substring(s,0,5) &vbcr
RichTextBox.Text = s1

or use vbcrlf?

No I have not tried
"ModelBuilder" <Mo**********@discussions.microsoft.comwrote in message
news:89**********************************@microso ft.com...
>The following code shows a vbCR in both strings for me.

Dim s, s1, s2 As String

s = "this is an example string"

s1 = Microsoft.VisualBasic.Left(s, 5) & vbCr
s2 = s & vbCr

MessageBox.Show(String.Format("[{0}] [{1}]", s1, s2))

"AWW" wrote:
RichTextBox.Text = string & vbCR works but
if I extract a substring with microsoft.visualbasic.left
then vbCR stops working.
I can do F5 executes with/without the Left and the vbCr does/doesNot
work. Comment?
Jun 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.