Hi all,
I’m trying to detect when Excel get focus. Well, actually I’m trying to detect when my workbook gets focus, but I want to detect when the focus is received from a different application.
All of these methods seems to detect when I switch between Excel windows, but not other applications.


vb Code:
  1. Private Sub Workbook_SheetActivate(ByVal Sh As Object)
  2. Private Sub Workbook_Activate()
  3. Private Sub Workbook_WindowActivate(ByVal Wn As Window)
  4. Private Sub Application_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
  5. Private Sub Application _WorkbookActivate(ByVal Wb As Workbook)
Does someone know how to do this?

Thanks,
-Terry

Cross post here:
http://www.xtremevbtalk.com/showthread.php?t=312278