cancel
Showing results for 
Search instead for 
Did you mean: 

Analysis for office - Save changes before exit

mhajek
Explorer
0 Kudos
1,415

Hello,

We are currently developing some AO - based planning app for about 100 users.

Only one superuser has rights to actually modify the workbooks, the others just use them for planning and reporting purposes.

We also use one workbook as "redirecting", it just loads a query, opens another WB and closes itself.

And there our problem comes.

Is there any possibility to turn off the prompt that Analysis shows every time you try to close a Workbook "Do you want to save your unsaved modifications before exit" or so...

We don´t need it, users get confused and the redirecting workbook just won´t close without manually clicking "No" on this thing..

I haven´t found any Analysis setting, macro or so that could avoid it...

We are using version 2.7.1.

Any help is deeply appreciated.

MartinHájek

Accepted Solutions (0)

Answers (4)

Answers (4)

Put this to the Workbook macro:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

Problem solved.

rodolfo_bermudezneubauer3
Active Participant
0 Kudos

Exactly what we were looking for! Thank you

gcybill
Active Participant

Hi Martin,

The "redirecting" workbook seems to be the portal.

You can try other approach. Instead of closing the AO WB, try minimizing:

https://stackoverflow.com/questions/40679441/minimize-workbook-sheet-but-keep-form-opened

mhajek
Explorer
0 Kudos

Sad thing, but we stayed stuck with a simple message " Please close this workbook" instead of any real solution.

Martin

Former Member
0 Kudos

Hi Martin,

Look at that Microsoft link,

suppress-save-changes-prompt-when-you-close-a-workbook-in-excel

Regards


Eric

l

mhajek
Explorer
0 Kudos

Thank you, but the problem is not Excel, but Analysis. Without the Analysis query, the workbook quits without asking (thanks to some simple macros), but analysis plug-in always asks to save the analysis workbook anyway.

Martin