How do I clear cell content when excel document is closed?
I am trying to clear the content of some "data" cells when I close the excel
document, without having to go to "edit,clear,content" route. Is this possible? |
Hold and click Ctrl+F11 to open the VB editor. In the 'Project - VBA Project
window" find and double click on "ThisWorkbook". Then paste this code... (Change range to suite) Private Sub Workbook_Close() Range("E6:G15").Select Selection.ClearContents End Sub "m3155" wrote: I am trying to clear the content of some "data" cells when I close the excel document, without having to go to "edit,clear,content" route. Is this possible? |
All times are GMT +1. The time now is 12:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com