Application.SendKeys "{PGDN}", True
Works just fine, however Application.SendKeys "{%TAB}", True and Application.SendKeys "%{TAB}", True do nothing.
How do I execute an alt-tab with sendkeys to switch windows?
Here is the code:
Application.SendKeys "{PGDN}", True
Application.SendKeys "{PGDN}", True
xreply = MsgBox("Is this page for women? Record:" & i, vbYesNo, "Gender Checker")
If xreply = vbYes Then
ActiveSheet.Range("C" & i).Value = vbYes
End If
Use this:
Sub ReturnToWindows()
Application.SendKeys ("%{TAB}")
DoEvents
End Sub
Must be run while you are in Excel rather than the VBE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With