Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2006, 06:59 AM
Authorized User
 
Join Date: Aug 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to

Hi Peeps
How ya all doin?I have a small problem here i am trying to trim a string in a field before putting it in the database,i need the last three digits " the existing value is Administrator 001 in the listbox
could sumone please suggest a soution please..
new to programming..cheers

 
Old September 13th, 2006, 08:32 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Dim sID as string = txtBox.Text

sID = sID.Substring((sID.Length - 3), 3)

That should give you the last 3 places of the string.

"The one language all programmers understand is profanity."









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.