Closing a Cell When Excel goes Inactive

  • Thread starter David C. Barber
  • Start date
D

David C. Barber

Excel 2000. I want to be able to close off the data entry/editing on a cell
when the user switches to another application. The reason for this is that
while the cell remains open for editing I cannot remotely execute save and
close macros from an external application. While I know I can close editing
on a cell with SENDKEYS {ENTER}, among other things, I'm unable to find an
event the reliably fires when the user switches from Excel to another
application. So what I'd like is:

1: An event to use in my spreadsheet VBA code that will fire each time the
Excel application goes inactive.

2: A better way to close editing on a cell, of something better than
Sendkeys exists.

3: Optional: A property or method call that will let me know when the user
currently has the cell open for data entry/editing.

Thanks!
 
G

Guest

Maybe this........

Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)
YourCodeHere
End Sub

Vaya con Dios,
Chuck, CABGx3
 

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

Top