Skip to content

Instantly share code, notes, and snippets.

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