Public Function StringBetweenStringsFast( _ ByRef vSearch As String _ , ByRef vLeft As String _ , ByRef vRight As String _ , ByRef vCompare As VbCompareMethod _ ) As String
StringBetweenStringsFast("Forms![Menu]![Close]", "[", "]", vbBinaryCompare) = "Menu" StringBetweenStringsFast("Forms![Menu]![Close]", "(", ")", vbBinaryCompare) = "" ' #2. StringBetweenStringsFast("Larry 'Bud' Melman", "'", "'", vbBinaryCompare) = "Bud"See also:
StringBetweenStrings FunctionvSearch: The string which is to be searched for the appearance of vLeft followed by vRight.
Function returns an empty string if either vLeft or vRight is an empty string.
Function returns an empty string if vLeft does not appear within vSearch followed by vRight as in example #2.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.