R
ReidarT
How do I use left, mid and right in vb.net?
regards
reidarT
regards
reidarT
* "ReidarT said:How do I use left, mid and right in vb.net?
Simon Jefferies said:Hello,
In what way does it not work?
You seem to be retrieving the middle part of a string from a textbox entry,
where as using the Left function is to return the leftmost characters only.
You may get an error if you try to retrieve letters from a string when there
aren't enough in it?
Regards
Simon Jefferies
mailto:simon[nospam]@cooltoolsonline.co.uk
-- remove [nospam] to email me --
ReidarT said:if I use the mid-function, it works, but if I use left-function it does
not
work
Here is the code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim s As String
s = TextBox1.Text
s = Mid(s, 3, 4)
Label1.Text = s
End Sub
reidarT
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.