Fast way to truncate string
"GS" wrote:
Try using this optimized version I posted earlier...
Function TruncateString$(sText$, sFind$, Optional lStart& = 1)
TruncateString = Mid$(sText, lStart, InStr(sText, sFind) - lStart)
End Function
This function causes the following error:
Compile error:
ByRef argument type mismatch
Seems like the problem is related to the data being passed
into the "sText$" parameter, but I'm not sure.
|