Hi there!
I am using the code below to disable both print, save, and save as features on my Excel 2003 files. However, I realize that users may get a chance to disable macros when opening my files, which really sucks. So, I’d like to find a way to also use VBA to hinder users from doing that. Is that possible? Having a message box that could alert them about this would be even nicer.
Now that I think it thorough, I also need a code to disable the copy feature so that users might not get a chance to get partial or total copies of my files. This is mandatory without exception. Otherwise, the codes below will not serve its purpose.
And just to let you know: My idea is also to use a VBAProject Password to hinder users from disabling codes, but this is easy to do. I just need somebody’s help to be able to accomplish all what I mentioned before:
============================
Private Sub Workbook_Open()
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then Cancel = True
End Sub
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
MsgBox "Sorry! You're not allowed to print this file!"
End Sub
Bookmarks