prompt save only when changes have been made

LFKim2018

Active Member
Joined
Mar 24, 2018
Messages
267
whenever I close a workbook, even though no changes have been made, a message box prompt to save or not almost always appear.

I want the workbook to prompt only when there are changes made - and close right away when there are not (no prompt nor message box)..

thank you
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
It's the result of volatile functions like TODAY, OFFSET etc.
Or even of references like A1:INDEX(...)
Those recalculate each time workbook is open, thus cells with such functions/referencing become dirty.
But you may save workbook as XLSM or XLSB with the below code in its ThisWorkbook module:
Rich (BB code):
Private Sub Workbook_Open()
  Me.Saved = True
End Sub
 
Last edited:
Upvote 0
Mr. ZVI
thank you for your reply
let me please explain my workbook (with several macros) - it is a costing program wherein dimensions and quantities have to be entered to compute for the cost of a particular metal desking frame.
even though there was not a single data entered (just opening the workbook - then closing it) there always is a prompt for saving or not.. kinda irritating.
vba should determine if there was data entered before issuing a save - not save prompt .. otherwise the workbook should just close right away (because no data was entered)
hope you got this
many thanks
 
Upvote 0
Mr. ZVI
thank you for your reply
let me please explain my workbook (with several macros) - it is a costing program wherein dimensions and quantities have to be entered to compute for the cost of a particular metal desking frame.
even though there was not a single data entered (just opening the workbook - then closing it) there always is a prompt for saving or not.. kinda irritating.
vba should determine if there was data entered before issuing a save - not save prompt .. otherwise the workbook should just close right away (because no data was entered)
hope you got this
many thanks
Hi FKim,
The behavior of the issue is clear, thanks.
The code suggested in my previous post may solve it, have you tried it?
Regards
 
Upvote 0
Hi FKim,
The behavior of the issue is clear, thanks.
The code suggested in my previous post may solve it, have you tried it?
Regards

Mr ZVI
thank you for your reply.
I tried it but it isn't working.
can I send you the file for analysis?
How can I send it?
Thank you
 
Upvote 0
...
can I send you the file for analysis?
How can I send it?...

Hi LFKim,

I've sent you my email in Private Message (PM).
You may email me your file for analysis.

Regards
 
Upvote 0
Mr ZVI
so sorry I don't know where to find your PM
thank you
On very top line of this web page click on item Notifications and choose Unread Private Messages
 
Last edited:
Upvote 0
On very top line of this web page click on item Notifications and choose Unread Private Messages

Mr ZVI
I checked the 'notification' - there was no message.

thank you
 
Last edited by a moderator:
Upvote 0
Please check PM once more.
I've sent you email as well.
But please do not post your email here as it is sensitive data.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top