worksheet protection

  • Thread starter Thread starter ososmarmy
  • Start date Start date
O

ososmarmy

Is there a way to prevent a protected workbook and worksheet from bein
"saved as" a text file. I'm using excel 2002 and windows 2000
 
do you mean a "txt" extension file, or just being "Saved As" anything?
 
If I can prevent it from being "saved as" anything that would be great.
I'm just trying to prevent the copy protection from being worked
around.
 
Almost anything you do to try to stop this would involve macros. And that won't
stop the really dedicated.

But something like this in the ThisWorkbook module will stop some (maybe even
most):

Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
MsgBox "Please don't save this"
Cancel = True
End If
End Sub


But I could use windows explorer and just copy it somewhere else.

(Or copy the cells into another workbook and save that one. Excel isn't made
for this kind of security.)
 
there is no way to make it foolproof. one can simply copy a file to
another location, rather than using SaveAs.

here is a way to avoid SaveAs. it is a VB macro.

this macro was provided by harlan and dave in one of my earlier posts.

this code needs to go into the WorkBook_BeforeSave procedure.

If SaveAsUI = True Then
MsgBox "Restriction on FileSaveAs location!", vbCritical
Cancel = True
Exit Sub
End If
 
Thanks for your help. At least I can weed out the truly unmotivated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top