ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automatic close of pages (https://www.excelbanter.com/excel-programming/412388-automatic-close-pages.html)

N+

automatic close of pages
 
hi all !!!
in presence of a "false" in my cell a1 i want my worksheet to save and close..
can u help me ??
ty , paolo

NateBuckley

automatic close of pages
 
Copy this into your sheet of choice.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Cells(1, 1).Value = False Or Cells(1, 1).Value = "FALSE" Then
ThisWorkbook.Save
Application.Quit
End If
End Sub

Hope this helps!
"N+" wrote:

hi all !!!
in presence of a "false" in my cell a1 i want my worksheet to save and close..
can u help me ??
ty , paolo



All times are GMT +1. The time now is 04:14 AM.

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