G Marshall
Board Regular
- Joined
- Dec 31, 2002
- Messages
- 134
Hi there
Within an excel workbook I have a visual basic code that shuts the workbook down following a period of inactivity. I have the workbook password protected so that I am the only person who can change anything. All other users only need to view the workbook.
Sub ShutDown()
CreateObject("WScript.Shell").Popup _
"Due to inactivity this workbook is now closing", 2, "ATTENTION"
ThisWorkbook.Close
End Sub
This works fine except that prior to it closing down automatucally, excel asks if I want to save any changes and until I click no in that dialog box the system will not close.
I can set the file properties to ‘read only’ but before it closes automatically it tells me that the file is read only and do I want to save it under a new name.
Is there any way that I can close the workbook down without saving and without the system asking if I want to save it.
Appreciate any help
Gerald
Within an excel workbook I have a visual basic code that shuts the workbook down following a period of inactivity. I have the workbook password protected so that I am the only person who can change anything. All other users only need to view the workbook.
Sub ShutDown()
CreateObject("WScript.Shell").Popup _
"Due to inactivity this workbook is now closing", 2, "ATTENTION"
ThisWorkbook.Close
End Sub
This works fine except that prior to it closing down automatucally, excel asks if I want to save any changes and until I click no in that dialog box the system will not close.
I can set the file properties to ‘read only’ but before it closes automatically it tells me that the file is read only and do I want to save it under a new name.
Is there any way that I can close the workbook down without saving and without the system asking if I want to save it.
Appreciate any help
Gerald