View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jean-Luc CAPEL Jean-Luc CAPEL is offline
external usenet poster
 
Posts: 1
Default file removal before Excel closing

Hi,

Here is an academic case.
I have two Workbooks :
the first contain datas,
the second contain program modules.

When the application close :
I close the data workbook,
then I remove this workbook on the hard disk,
and finally, if there are not other opened Workbook, I leave Excel, if not
to close the program workbook.

This Closing can occur:
either by the Click on a button "To leave" of a personalized toolbar
affected with a subroutine of my program workbook,
or by closing data workbook (File/ Close or Cross [ X ] window of the data
workbook)
or finally by closing of Excel (File/ Quit or Cross [ X ] window of Excel)

In the two1st cases, I manage in VBA to remove the data file of my disc.
In the last case, Excel automatically gives the hand to the event of closing
of the programs workbook before that of the data workbook, which prevents me
from removing the data workbook on the hard disk.

In short, there is you a solution to reverse the events of closing of the
workbook when Excel is left?

Thank you for your answers and/ or suggestions.
JLuc