andysuth
08-06-2008, 08:19 AM
Hi,
I'm trying to transfer a macro from Excel to Access (that is, I'm trying to re-write a macro I have written in Excel to make it function in Access, not write a macro to import data from excel to access).
It's all gone pretty well so far, but I'm stuck on two critical lines, were the macro pretends to be a user typing into another application (simple lines like "Update" and "Print" and "Save As") in the form of <CTRL><L> <CTRL><P> etc.
It works fine in Excel, with this code (sample only, not whole sequence!)
Application.Wait Now() + TimeSerial(0, 0, 12)
Application.SendKeys "^l", True
But Access doesn't like the application.wait or application.sendkeys methods(?).
This is a critical part of the operation, and it interfaces with software that does not distribute an API.
Can someone tell me how to "Sendkey" and "wait" in Access?
Thanks,
-Andy.
I'm trying to transfer a macro from Excel to Access (that is, I'm trying to re-write a macro I have written in Excel to make it function in Access, not write a macro to import data from excel to access).
It's all gone pretty well so far, but I'm stuck on two critical lines, were the macro pretends to be a user typing into another application (simple lines like "Update" and "Print" and "Save As") in the form of <CTRL><L> <CTRL><P> etc.
It works fine in Excel, with this code (sample only, not whole sequence!)
Application.Wait Now() + TimeSerial(0, 0, 12)
Application.SendKeys "^l", True
But Access doesn't like the application.wait or application.sendkeys methods(?).
This is a critical part of the operation, and it interfaces with software that does not distribute an API.
Can someone tell me how to "Sendkey" and "wait" in Access?
Thanks,
-Andy.