Saved seems not to work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wrote a macro that generates an exel file and I save it with save as, but I
don't close it to give the users the possibility to change the file.

The problem I got, is that, when closing the file, Exel doesn't ask to save
the changes, consequence: the users loose all their additions-changes etc,
and they are angry (more than acceptable).

I added a last line : ActiveWorkbook.Saved = False, and checked it: the
status is false, but it does not make a difference.

So, please help.
 
Hello Guido,

Before a workbook is saved the Workbook.Path = "" and Workbook.Saved =
False. Once you Save As, Excel sets the Workbook.Path. That's how Excel
knows the Workbook has been saved.

You can bring up the Save As dialog in your code at anytime regardless
of these 2 property settings.

DISPLAY SAVE AS DIALOG:
Application.Dialogs(xlDialogSaveAs).Show

Sincerely,
Leith Ross
 
Back
Top