-
I'm trying to send the following keys from a command botton:
tab + alt in order to call all minimized APPs but it does not work.
What can be wrong in this simplest instruction?
sendkeys "%{tab}"
because it does nothing at all.
Do you know any other way?
-
I think it works
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_TAB = &H9
Private Const VK_MENU = &H12
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click()
'Alt Down
keybd_event VK_MENU, 0, 0, 0
'Tab Pressed
keybd_event VK_TAB, 1, 0, 0
'Alt Up
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub
-
isn't the symbol for "alt" ^ ??
-
You may be right but I checked the code, it works fine.
you can omit the alt up to see what you want to choose.
-
ok