+ Reply to Thread
Results 1 to 5 of 5

Disable save and prevent "Do you want to save" message from prompting for read-only file

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Disable save and prevent "Do you want to save" message from prompting for read-only file

    Hi all,

    I have a protected file.

    When users open as read only and closes the file, I want the file to close without saving any changes AND prevent the "Do you want to save" message from prompting as well.

    Please Login or Register  to view this content.
    I tried the above code, and even if i didnt make any changes when i open the file in read-only, the message will still prompt when I closes the file.

    Appreciate if nyone can help.

    Thank you!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Disable save and prevent "Do you want to save" message from prompting for read-only fi

    Just one question how the user will able to save the ReadOnly file?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Disable save and prevent "Do you want to save" message from prompting for read-only fi

    Hello hcyeap,

    The code will now disable saving changes and the prompt.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Disable save and prevent "Do you want to save" message from prompting for read-only fi

    Application.DisplayAlerts = False
    Ben Van Johnson

  5. #5
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: Disable save and prevent "Do you want to save" message from prompting for read-only fi

    Please Login or Register  to view this content.
    Hi all,

    I modified the code and it is working the way i expected, not sure if it's correct though.
    I have to use before close instead of before save. Now, the user with read only access can do what ever they want, and when they close the file, it wont prompt the message "save as copy xxxx".

    Hope it works though.

    Thank you all!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need macro to disable "Save" and "Save as" buttons
    By Anforya in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-20-2013, 01:06 PM
  2. Prevent "Save as CSV" From changing a file
    By PY_ in forum Excel General
    Replies: 4
    Last Post: 09-13-2010, 12:57 PM
  3. Not Save "Read Only" file via Macro
    By Rough in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2008, 02:04 PM
  4. How to prevent "Changed ... Save?" Message after disabling Shape?
    By Joe HM in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-04-2006, 11:30 AM
  5. Replies: 1
    Last Post: 03-29-2006, 09:15 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1