Advertisement
AlanElston

UpImmediateWindowbyCode

Nov 28th, 2018
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub ImmediateImediate()
  2.     If Application.VBE.MainWindow.Visible = False Then Application.SendKeys Keys:="%{F11}"
  3.  Application.SendKeys Keys:="^g"
  4. Debug.Print "Don't blink, or you will miss this!.. ( hopefully :-) )"
  5. Application.OnTime earliesttime:=Now + TimeValue("0:00:01"), procedure:="WipeMy_"
  6. Application.OnTime earliesttime:=Now + TimeValue("0:00:02"), procedure:="Trash_t"
  7. End Sub
  8. Public Sub Trash_t()
  9.  On Error Resume Next
  10.  Application.VBE.Windows("Immediate").Close ' English Excel
  11. Application.VBE.Windows("Direktbereich").Close ' German Excel
  12. ' Application.VBE.Windows("&%$§$%&!*#").Close ' HinDuWolly Excel
  13. On Error GoTo 0
  14.  Let Application.VBE.MainWindow.Visible = False
  15. End Sub
  16. Public Sub WipeMy_()
  17.  Application.SendKeys "^g ^a {DEL} "
  18. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement