Clear cells on closing the workbook. Excel 2016

dougw71

New Member
Joined
Mar 17, 2017
Messages
2
How does one clear cells of values only upon closing the workbook; such that, the next person to open the program cannot see the value posted by the last user? I am able to write a Macro that will clear the cells when the Macro is "run"; but, how to make the Macro run upon closing or opening, that is the problem. Thanks.
Doug
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
In the Vba project window double click on "ThisWorkbook"

Enter this code:
Code:
Private Sub Workbook_Open()
'Do stuff here

End Sub
 
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,899
Members
449,477
Latest member
panjongshing

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