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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,759
Messages
6,132,544
Members
449,735
Latest member
Gary_M

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