Consulting

Results 1 to 5 of 5

Thread: Disable "Save" & "SaveAs"

  1. #1

    Disable "Save" & "SaveAs"

    hi
    How the icon "Save" and "saveAs" to disable it?

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi there,

    What year/version of Excel are you using; or if this is for a workbook used at work, what are the newest and oldest versions of Excel in use?

    I ask, as probably many still use 2003 or earlier, and whole menubar (where the save and saveas icons are) changed in 2007; so the answer would be markedly different depending on version(s) in use.

    Another thing to consider is that regardless of whether you can disable a command, what about shortcut key combinations, such as CTRL+S or SHIFT+F12 or etc... ?

    Mark

  3. #3
    hi gto
    my version of excel =2010
    help me please

  4. #4
    this will not disable the buttons, but will prevent saving of workbook
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Cancel = True
    
    End Sub

  5. #5
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    the best way, imho, is the customized ribbon specific to your file.

    you can download Custom UI Editor to customize the ribbon for your files here:
    http://openxmldeveloper.org/blog/b/o...8/07/7293.aspx


    you can find many tutorials or find files to adopt your requirements by googling.
    here is one:
    http://www.rondebruin.nl/win/section2.htm

    it's not an easy task if you are novice and first you need to learn how to use the editor and the basics.
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •