Saved seems not to work

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.
 
L

Leith Ross

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
 

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