Right, Sprinks
If you just wanted to know which control had focus before the command
button, Screen.PreviousControl should do. Be sure to use error-handling:
I've always found Screen.PreviousControl a little flakey, so I tend to put
it in a separate function so it doesn't muck up the main one.
Doug is right: I assumed the command button was doing something like,
"Insert boilerplate text at the cursor position in the previous control."