' Listing 1: The nInStr Function Function nInStr(strSource,strFind,occurrence) StartPosition = 1 ' ******* BEGIN CALLOUT A ******* For Findoccurrence = 1 to occurrence FoundPosition = InStr(StartPosition,strSource,strFind) StartPosition = FoundPosition + 1 If FoundPosition = 0 Then Exit For End If Next ' ******* END CALLOUT A ******* nInStr = FoundPosition End Function