Thanks, Eric - but that's not the problem. I was assuming that the user had clicked in the text field first, then typed. When I "select" as you suggest, the attempt to "type whichKey" still breaks the function. But "put whichKey" doesn't break it. Help! --