Connecting Tech Pros Worldwide Forums | Help | Site Map

Text Cut

kevcar40
Guest
 
Posts: n/a
#1: Mar 13 '06
Hi
I have a string that varies in length ie ABCDEFGH or ABCDEFGHI
what i want to do is read from the left 6 Characters and discard the
leftleaving only the right of th string
ie GH or GHI


Thanks
kevin


simon@geniecom.fsnet.co.uk
Guest
 
Posts: n/a
#2: Mar 13 '06

re: Text Cut


Dim Str1,Str2
str1 = "ABCDEFGH"
str2 = Right(str1, Len(str1) - 6)
msgbox str2


This will take everything within the string, starting at character 7.

Hope this helps

Simon

Lyle Fairfield
Guest
 
Posts: n/a
#3: Mar 13 '06

re: Text Cut


YourString = Mid$(YourString, 7)

kevcar40
Guest
 
Posts: n/a
#4: Mar 13 '06

re: Text Cut


thank you both

Closed Thread