View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PATS PATS is offline
external usenet poster
 
Posts: 17
Default Lock down a workbook

My code below is designed to lock down my spreadsheet if OptionButton2 is
true. Is there anyway to prevent someone from saving a copy of the file as
well?



Private Sub CommandButton1_Click()

On Error GoTo Termination

If OptionButton1.Value = True Then

bSELCTIONCHANGE = False

Unload UserFormAccess

Call Protection.protect_all_sheets

End If

If OptionButton2.Value = True Then

bSELCTIONCHANGE = True

Unload UserFormAccess
UserFormPassword.Show
End If



GoTo LastLine

Termination:

LastLine:

End Sub