ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to increment a value by 1 everytime excel is closed? (https://www.excelbanter.com/excel-discussion-misc-queries/122508-how-increment-value-1-everytime-excel-closed.html)

ruzual

how to increment a value by 1 everytime excel is closed?
 
i want to increment a value by 1 everytime an excel sheet is closed. how to
do that?


Rookie 1st class

how to increment a value by 1 everytime excel is closed?
 
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'On Close
Range("YourValue") = Range("YourValue") + 1
End Sub
Lou

"ruzual" wrote:

i want to increment a value by 1 everytime an excel sheet is closed. how to
do that?



All times are GMT +1. The time now is 05:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com