Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send keys Problem

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
0
0
GB
Hi,

I am new to send keys and cant get this to work properly, I can get it to open the script and run the script, i just cant get it to go back to the script, the vba stops after the wait and only continues when I click either excel or vba, and then it completes okay, am I missing something here.

Code:
Sub sendkey()
Dim AltKey As String
Dim CtrlKey As String
Dim ShiftKey As String
Dim TabKey As String
Dim EnterKey As String

AltKey = "%"
CtrlKey = "^"
ShiftKey = "+"
TabKey = "{TAB}"
EnterKey = "~"
AppActivate "Lucent Centrevu Supervisor - 129.0.0.61", True
SendKeys AltKey & "sv", True
Application.Wait Now + TimeValue("00:00:06")
AppActivate "Rob VDN Report", True
SendKeys EnterKey, True
Application.Wait Now + TimeValue("00:00:02")
SendKeys AltKey & "ea" & EnterKey & EnterKey, True
Range("a1").PasteSpecial xlPasteAll

End Sub

Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top