Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting a String 1

Status
Not open for further replies.

SgtPepps

IS-IT--Management
May 1, 2002
109
GB
I have an 8 caracter string and I need to obtain the last three digits and create another variable from them. Could someone help me as i dont have enough time to get a book.

Kind Regards

SgtPepps
 
Hi sarg!

You want to use the Right function...
Code:
If Len(SourceString) > 3 Then 
   MyString = Right(SourceString, 3)
Else
   MyString = "TILT!"
End If
If SourceString is "ABCDEF" then MyString will be "DEF".

Hope this helps :) Skip,
metzgsk@voughtaircraft.com
 
Give it a star then - it's the right way to show recognition
Click on the "Click here to mark this post as a helpful or expert post"
G
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top