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.
Hope this is of use, Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
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] [yoda] [yoda]](/data/assets/smilies/yoda.gif)