Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Eliminate SaveAs capability

  Asked By: Meenachi    Date: Sep 05    Category: MS Office    Views: 424
  

I want to prevent user to perform "SaveAs" on my workbook. So, I copy below
code and tweak it. I tried to test it by selecting "SaveAs" from File Menu.
The message box didn't pop up. Please advise what I did wrong. I am using
Excel 2003, if it's relevant.

Private Sub workbook_BeforeSave(ByVal SaveAsUI As Boolean)

Dim lReply As Long

If SaveAsUI = True Then
lReply = MsgBox("Go Away", vbOK)
End If

End Sub

Share: 



Tagged: