473,509 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
3 3993
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
3193
by: lawrence | last post by:
Sorry for the dumb question but I'm new to Javascript. I wrote this script hoping to animate some div blocks on a page. You can see the page here: http://www.keymedia.biz/demo.htm Can anyone...
4
2731
by: mhw | last post by:
I don't found function! ThanksŁˇ
3
6082
by: Sam | last post by:
I want to divide character into 2 section. Example, 200412 divided into 2004 in A block and 12 in B block. Please advise how to use left(string, length) or right(string, length) for above...
3
15184
by: NathanC | last post by:
Left('ironman',4) Result - 'iron' Is there anyway to excute this task in VB.NET? Currently, I am determing the value of the 4th character, splitting on that, then grabbing the value of the...
5
2551
by: maya | last post by:
Hi, I'm writing an application that gets a string as an input from the user, and creates an image with this string. The library that creates the image doesn't recognize if the string is a...
6
9250
by: kellygreer1 | last post by:
What is a good one line method for doing a "length safe" String.Substring? The VB classes offer up the old Left function so that string s = Microsoft.VisualBasic.Left("kelly",200) // s will =...
5
3765
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I need a function (or code) that will physically change the words in a text string to make the first word be last, second word next to last, etc. but maintain the same position of the letters in...
6
6742
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have two questions with regards to the LEFT function. I ran into a problem with the LEFT function today. I knew it was a valid Function, but when I tried to use it, it was getting interpreted...
2
1902
by: ventos | last post by:
First of all, ive been trying to learn c++ for a couple of days ;) Problem i need to strip http links from string code: string replaceAll(string s, string f, string r) { unsigned int found...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.