But where should i write that code.I mean is there any event triggered when the close button is clicked on any form(well it must be), where to capture itAdd below line to the code. Instead of activeworkbook you can also use the name of it.
ActiveWorkbook.Close