alexdurc09
New Member
- Joined
- Sep 21, 2018
- Messages
- 17
Hello,
I have the below code which is attached to a button on aspreadsheet. Its function is to close the spreadsheet down and also savechanges. However, when the button is clicked, it closes down all open spread sheetswhich is no good if my colleagues are working other spread sheets too. Is thereany way so that when clicked, it just shuts down the active spreadsheet and notany other open spread sheets?
TIA,
Alex
Private Sub SaveClose_Click()
ThisWorkbook.allowed = True
Application.Quit
ThisWorkbook.Save
End Sub
I have the below code which is attached to a button on aspreadsheet. Its function is to close the spreadsheet down and also savechanges. However, when the button is clicked, it closes down all open spread sheetswhich is no good if my colleagues are working other spread sheets too. Is thereany way so that when clicked, it just shuts down the active spreadsheet and notany other open spread sheets?
TIA,
Alex
Private Sub SaveClose_Click()
ThisWorkbook.allowed = True
Application.Quit
ThisWorkbook.Save
End Sub
Last edited: