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.
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