I have many windows/applications (Internet explorer, notepad, Excel, Outlook,etc) running.
I wanted Excel Book1 to do certain actions or macro when the user click on the excel book1 button/icon on the task bar.
I had placed these code in "ThisWorkbook"
Private Sub Workbook_WindowActivate(ByVal Wn As Window)
'MsgBox "window activated"
End Sub
What i want is something like this:
Eg, I am using Internet explorer now, when i click on Book1 excel button / icon in the taskbar, Book1 get focus, the msgbox will be activated. however i am not getting this. Book1 get the focus but msgbox is not showing
I realised that if i had click on another workbook then Book1, the message box will be activated then.
Any idea where is the cause of the msgbox not showing when i click the excel icon from other applications instead of excel? How can i overcome this? Please help!
Many thanks in advance
Bookmarks