Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
AppActivate trouble...
I was using AppActivate with the Sendkeys statement with
great success on my old workstation (P2-366Mhz with NT) in a workbook I use all day to communicate with a program running in the background. Today I got a new workstation (P4-2Ghz with XP), loaded the workbook and the macro doesn't work as well. The first time I try after loading up the workbook it works and then the second time it doesn't activate the background app (I don't know if it's trying to send the keys). And it'll work intermittently after that... Any help would greatly appreciated. btw... i do have the wait option set to true... Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
AppActivate trouble...
David Kay wrote:
I was using AppActivate with the Sendkeys statement with great success on my old workstation (P2-366Mhz with NT) in a workbook I use all day to communicate with a program running in the background. Today I got a new workstation (P4-2Ghz with XP), loaded the workbook and the macro doesn't work as well. Maybe a timing problem of some sort. You may need to insert a DoEvents before the SendKeys to give the AppActivate a chance to work - otherwise the keys may be being swallowed by something else. You may even need to insert a delay. Here's a procedure to sleep for a while: ' at the top of your module Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) ' in your code Sleep 500 ' wait half a second Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IRR Trouble | Excel Worksheet Functions | |||
more trouble with i | New Users to Excel | |||
still having trouble with this.... | Excel Worksheet Functions | |||
trouble with add ins | Excel Discussion (Misc queries) | |||
appactivate sendkeys not working with accelerator | Excel Programming |