VBA/Excel/Access/Word/Application/Application SendKeys

Материал из VB Эксперт
Перейти к: навигация, поиск

Clears Immediate window

 
Sub SendKeyActionToImmediateWindow()
    Application.VBE.Windows.Item("Immediate").SetFocus
    Application.SendKeys "^a"
    Application.SendKeys "{Del}"
End Sub



Sent key stroke with Application.SendKeys

 
Public Sub SendKeyTest()
  Dim ReturnValue As Double
  ReturnValue = Shell("NOTEPAD.EXE", vbNormalFocus)
  Call AppActivate(ReturnValue)
  
  Application.SendKeys "Copy Data.xls c:\", True
  Application.SendKeys "~", True
  Application.SendKeys "%FABATCH~", True
End Sub