Excel disable the save as command.

Solved
FredHub -  
 Muriel -
Hello,

I have a shared Excel file for which I want to disable the "Save As..." command. I would like users to only use the "Save" command to save their work.

Can someone help me?

Thank you in advance and best regards.

Configuration: Windows XP / Internet Explorer 6.0 / Excel 2003

2 answers

  1. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
     
    Hello,

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = SaveAsUI End Sub 


    You can add an information dialog if you want...

    eric
    4
    1. chossette9 Posted messages 6855 Registration date   Status Contributor Last intervention   1 313
       
      Hello,

      I have a question to ask: does canceling the "save as" option prevent choosing the folder to save in? This is not a problem when the file has already been saved. But what about the very first save of the file?
      0
    2. FredHub
       
      Thank you, Eriic, it works, it's exactly what I was looking for.

      Regarding the dialog box, my knowledge of Visual Basic being limited, could you show me how to make it appear when users of the file click on save as...?
      0
    3. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
       
      Hello,

      Like this for example:
      Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI Then MsgBox ("The 'Save As...' command is disabled") Cancel = SaveAsUI End Sub


      @chossette: if the file has never been saved, the 'Save As...' dialog box is always proposed. So you can't save it.

      eric
      0
    4. FredHub
       
      Excellent Thank you very much Eriic for your precise and short answers. :-)

      Wishing you all the best.
      0
    5. chossette9 Posted messages 6855 Registration date   Status Contributor Last intervention   1 313
       
      That's what I thought, thanks for the info!
      0
  2. jfqld Posted messages 8725 Registration date   Status Member Last intervention   127
     
    If I remember correctly with Excel 2003

    your mouse should be on your menu bar between "File" and "Edit" for example
    you right-click your mouse
    a window opens with all the menus
    at the bottom of this window, click on CUSTOMIZE
    click on the COMMAND tab
    hover your mouse over File (as if you wanted to save your work)
    go to SAVE AS...
    it gets highlighted with a black frame
    right-click
    and click delete
    and your SAVE AS menu will disappear

    --
    I rush to laugh at everything for fear of crying
    -1
    1. FredHub
       
      Thank you, jfqld, for your detailed instructions. However, the problem remains unresolved. I do not wish to hide the "Save as..." command in Excel; rather, I want the command to be inaccessible for a specific file, and the same should apply to all users who open this file. However, the command should remain accessible for all other Excel files.
      0