Worksheet is no longer the active sheet Event

  • Thread starter Thread starter Todd Huttenstine
  • Start date Start date
T

Todd Huttenstine

Hey guys

I do not know what event this would be but I need to put a
code in an event to where if the user selects another
sheet OR clicks on another application on the taskbar OR
hits ALT TAB and choses another application. Like a
worksheet lose focus event?


Thanks
Todd Huttenstine
 
Todd,

There is no event indicating that Excel is no longer the active
application. For switching between worksheets, see the Activate
and Deactivate events of the Worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
man...

What are these 2 events for?

Private Sub App_WorkbookDeactivate(ByVal Wb As Workbook)
MsgBox "Losing Focus"
End Sub

Private Sub Workbook_WindowDeactivate(ByVal Wn As
Excel.Window)
MsgBox "Losing Focus"
End Sub
 
The App_WorkbookDeactivate event occurs when you switch from one
workbook to another, i.e., when the ActiveWorkbook changes its
reference.

The WindowDeactivate event occurs when you switch from one window
to another. Remember, a Workbook can have several windows, so
this event may occur even with the App_WorkbookDeactivate does
not.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top