• SendKeys to External Program (Access 97, Win 95/98)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » SendKeys to External Program (Access 97, Win 95/98)

    Author
    Topic
    #365259

    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 smile

    Reply To: SendKeys to External Program (Access 97, Win 95/98)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: