Function name(instring) name = Left(instring,(InStr(instring, "."))) End Function %> Thanks so much, it works!