In my program I have prevented the user from saving the Workbook with the following code
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim p As String Cancel = True Do While Cancel = True p = InputBox("Enter password to save file:", "Password Required To Save", "") If p = "Enter Password Here" Then Cancel = False Else yn = MsgBox("Wrong password. Try again?", vbYesNo, "Invalid Password") If yn = vbNo Then Exit Sub End If End If Loop End Sub
I also need to prevent the user, when they use the save as, from saving certain worksheets.
Ex: There are 6 worksheets in the workbook. I only want them to be able to save the first three.
Issues: One of the workbooks that I want to allow them to change has a tab name that changes frequently.