VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Search a string for any given character(s) in reverse.

by www.coderhq.com (5 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 27th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Search a string for any given character(s) in reverse.

Rate Search a string for any given character(s) in reverse.



' Create One Text Box and 1
' Command Button then run
'
' For more code snippets
' please visit
' http://www.coderhq.com



Private Sub Command1_Click()

letterNum = InStrRev(Text1.Text, "jumps", 43)

MsgBox "Starting from the 43rd character and searching backwards, the word ""jumps"" was found starting at character " & letterNum, vbInformation

End Sub

Private Sub Form_Load()

Text1.Text = "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog."

End Sub


Download this snippet    Add to My Saved Code

Search a string for any given character(s) in reverse. Comments

No comments have been posted about Search a string for any given character(s) in reverse.. Why not be the first to post a comment about Search a string for any given character(s) in reverse..

Post your comment

Subject:
Message:
0/1000 characters