Create a variable, say "yourvariable", then in its own module, put the following code: Public yourvariable As Boolean 'Set yourvariable for Save. Then, in "Workbook", "Before Save", put the following code. The user will be given a message when he tries to save the workbook.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If yourvariable = True Then GoTo endit: ' checks if your variable is true
MsgBox "You are not allowed to save this workbook. If you wish to leave, click on the EXIT PROGRAM button"
Cancel = True
You can then write a macro like this:
yourvariable = True
This will allow you to save the workbook under macro control when you wish to.
Because we have a log that people enter onto via a worksheet. They click on a button on this log that transfers their individual entries to a master log. Therefore I do not want them to save the log that they enter onto. It causes me great hassle as various users are not the most copus mentus! and tend to fiddle!
Therefore I want a quick solution to remove the save functionality of the worksheet. However the responses I have recieved are taking me a little while to comprehend!! lol