If you're trying to close a program that has something like, say, an unsaved file, you'll get a prompt asking to save, thereby not closing the program immediately using SendKeys. Try going to the VB Help, search for AppActivate, and see what "See Also" items it lists to see if there is already something similar.