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.
--sb--