Skip to content

Instantly share code, notes, and snippets.

@asynxc
Created September 28, 2016 21:04
Show Gist options
  • Save asynxc/22895e75866ae6780ac5b821543686e5 to your computer and use it in GitHub Desktop.
Save asynxc/22895e75866ae6780ac5b821543686e5 to your computer and use it in GitHub Desktop.
'InStrRev Alternative function
'MSVBVM60.rtcInStrRev
Public Declare Function InStrRev Lib "MSVBVM60" Alias "rtcInStrRev" (ByVal Exp As String, ByVal Find As String, Optional ByVal Start As Long = -1, Optional ByVal Compare As VbCompareMethod = vbBinaryCompare) As Long
Public Function Alternative_InStrRev(ByVal Exp As String, ByVal Find As String, Optional ByVal Start As Long = -1, Optional ByVal Compare As VbCompareMethod = vbBinaryCompare) As Long
Alternative_InStrRev = InStrRev(StrConv(Exp, vbUnicode), StrConv(Find, vbUnicode), Start, Compare)
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment