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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extrach Letters from a String

Status
Not open for further replies.

AFK1

IS-IT--Management
Aug 26, 2005
38
US
I have a string that looks like this

123!ThisLetter!344

I need to get the letter 'ThisLetter' or in other word letter between first! and last!, because the length of the middle letter can change.

Any idea of how to do that.
Thanks.

 
Dim strTest As String

strTest = "123!ThisLetter!344"

Msgbox Split(strTest, "!")(1)

Split will create an array of string for you. This array starts at 0, so the (1) element of the array will be what you are looking for.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks...It worked..I got my value..
Great Day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top