How to send SendKeys ALT TAB?

Application.SendKeys "{PGDN}", True

Works fine, however Application.SendKeys "{% TAB}", True and Application.SendKeys "% {TAB}", True do nothing.

How do I execute alt-tab using 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 
+4
source share
1 answer

Use this:

 Sub ReturnToWindows() Application.SendKeys ("%{TAB}") DoEvents End Sub 

Should run while you are in Excel and not in VBE .

+4
source

Source: https://habr.com/ru/post/1501008/


All Articles