View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Coddington Tim Coddington is offline
external usenet poster
 
Posts: 94
Default Inter-program communication using SendKeys

Trying to figure out how to manipulate an instance of explorer from VBA.
Tried the following, but get a

"Run-time error '5':
Invalid proceedure call or argument"

on the AppActivate line.


Sub TryIt()
Dim ieAlphaTrade, ieAmeritrade As Double

ieAlphaTrade = Shell("C:\Program Files\Internet Explorer\iexplore.exe",
vbNormalFocus)
AppActivate ieAlphaTrade, True
End Sub

Tried a DoEvents before the AppActivate, and that seemed to help a little,
but the error came back.

Any hints?

Thanks in advance,
-Tim