VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to take the particular string from a sentence?

by Chandralal Prabu (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 7th February 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How to take the particular string from a sentence?

API Declarations


String I have to clip is 4254 using 'instrrev'method
copy the following code and paste it in V.B 6 it will work.


Rate How to take the particular string from a sentence?



a = InStrRev("02:245:4254-253", ":", Len("02:245:4254-253"))
b = InStr(1, "02:245:4254-253", "-", vbTextCompare)
MsgBox Mid("02:245:4254-253", (a + 1), ((b - a) - 1))
End Sub

Download this snippet    Add to My Saved Code

How to take the particular string from a sentence? Comments

No comments have been posted about How to take the particular string from a sentence?. Why not be the first to post a comment about How to take the particular string from a sentence?.

Post your comment

Subject:
Message:
0/1000 characters