InStrRev – A replacement for VB6’s InStrRev under VB4 and VB5

' A replacement for the InStrRev function under VB4 and VB5'' NOTE: uses the StrReverse functionFunction InStrRev(ByVal Text As String, Search As String, _    Optional ByVal Start As Long = -1, Optional ByVal CompareMethod As _    VbCompareMethod = vbBinaryCompare) As Long    Dim Index As Long    ' reverse the source strings,    ' so that we can use regular InStr    Text = StrReverse(Text)    Search = StrReverse(Search)    ' we must "reverse" Start too    If Start < 0 Then        Start = 1    Else        Start = Len(Text) + 1 - Start    End If        Index = InStr(Start, Text, Search, CompareMethod)    If Index Then        ' adjust the result        InStrRev = Len(Text) - Index - Len(Search) + 2    End IfEnd Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS