Thanks. I ended up using a timer to see if the messagebox does appear. When it does appear, the timer sends the keystroke.
>Maybe you should check first for MessageBox and send key only when it's present.
>
>>
>>I am using the Wscript.shell method of SendKeys to press the OK button on a MessageBox. But the MessageBox does not always appear. At the times it does not appear, the appending keystoke is still in the windows keyboard buffer. I am looking for a way to clear the buffer.
Greg Reichert