I have a workbook (i cannot upload due to restrictions) I have disabled the X button to prevent users from closing via that method.
I wish to have a user click an Exit button instead as this is capturing some usage data.
Can someone help please?
I have a workbook (i cannot upload due to restrictions) I have disabled the X button to prevent users from closing via that method.
I wish to have a user click an Exit button instead as this is capturing some usage data.
Can someone help please?
It would need to be in VBA, and it is possible.
Please ensure you mark your thread as Solved once it is. Click here to see how.
If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.
Thank you.
Could someone help me getting this done please? I have got as far as diabling the X button and that is it.
cheers
Hi dan,
Here are a couple of Macros you can use. See the attached workbook for the macros in context.
Lewis
![]()
Option Explicit Sub QuitExcelAfterSavingUsingVBA() 'Save the workbook that is running the code ThisWorkbook.Save 'Exit Excel Application.Quit End Sub Sub QuitExcelWithoutSavingUsingVBA() 'Disable 'Do You Really Want to Exit Without Saving message' Application.DisplayAlerts = False 'Exit Excel Application.Quit End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks