Listen for a close workbook

  • Thread starter Thread starter michael_mcclellan
  • Start date Start date
M

michael_mcclellan

Does anyone know how to program in VB the following

If "This workbook is closed" then
do something

Any ideas are appreciated. Thanks.
 
This might work for you.

Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
your code
End Sub

Steve
 
I should have been more specific. I have a macro that does some things
including open up a workbook, then I need the macro to wait until this
workbook is closed while I edit some values, then proceed with the rest
of the values.

Any ideas?
 
I can't give specifics, but I do know you can program macro to bring up
dialog box that calls for entering data. Macro halts further action
until data is entered in dialog box. Perhaps you could set it up so
that the values to be entered are entered into such a dialog box.

WindsurferLA
 

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