I'm trying to control an external program from Access using Sendkeys, but the problem is that my VBA code wants to continue running before the sendkeys come in.

Here's my code:
RetVal = Shell("N:MISROMacr~1SetupROMacr~1.exe", vbNormalFocus)
Start = Timer
Do While Timer < Start + 10
DoEvents
Loop
AppActivate RetVal, True
SendKeys "N", True
SendKeys "{ENTER}", True

I threw the timer in there to hopefully slow things down long enough to get the sendkeys statements out, but it didn't help.

Any ideas?

Thanks!

Cecilia <img src=/S/smile.gif border=0 alt=smile width=15 height=15>