ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save workbook needs to be added Please (https://www.excelbanter.com/excel-programming/336835-re-save-workbook-needs-added-please.html)

Vasant Nanavati

Save workbook needs to be added Please
 
this.Activate
Save
wb_exit:

etc.

--

Vasant


"Steved" wrote in message
...
Hello from Steved

When I use the close button could the below have added please "save"
Thankyou.

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim this As Worksheet
On Error GoTo wb_exit
Application.EnableEvents = False
Set this = ActiveSheet
Sh.Activate
Range("A5").Activate
this.Activate
wb_exit:
Application.EnableEvents = True
End Sub




Steved

Save workbook needs to be added Please
 
Thankyou.

"Vasant Nanavati" wrote:

this.Activate
Save
wb_exit:

etc.

--

Vasant


"Steved" wrote in message
...
Hello from Steved

When I use the close button could the below have added please "save"
Thankyou.

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim this As Worksheet
On Error GoTo wb_exit
Application.EnableEvents = False
Set this = ActiveSheet
Sh.Activate
Range("A5").Activate
this.Activate
wb_exit:
Application.EnableEvents = True
End Sub






All times are GMT +1. The time now is 02:13 PM.

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