+ Reply to Thread
Results 1 to 7 of 7

Save file as read-only

  1. #1
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Save file as read-only

    Hello Frineds

    I am creating read-only excel file
    my code is like this:
    Please Login or Register  to view this content.
    Problem is that when i open this file that time excel show me msg (sample Attached)
    i dont want to excel show this msgbox
    Excel completly save as read-only and no have rights to change the matter or rename it.
    Attached Files Attached Files
    Last edited by mohan.r1980; 01-16-2015 at 11:45 AM.

  2. #2
    Registered User
    Join Date
    12-12-2014
    Location
    PL
    MS-Off Ver
    2010
    Posts
    55

    Re: Save file as read-only

    As your code says, Read only is just a recommendation that the user can dismiss. If you want this to be permanent you need the code to protect the file.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Save file as read-only

    What's about?

    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Save file as read-only

    Hi friends,
    thanks for reply
    i have change the code like this:
    Please Login or Register  to view this content.
    but result is same
    if i unprotect workbook by password then still i want to open it with Read-Only mode.
    first thing i dont want opening password, but if workbook can't take read-only command without protection then its ok.
    while i try both the option but result is same. when i unprotect this file then i can change the figure and save it.

    See i just want that user can change the figure as he wants but he can not be save the file as same name, excel should ask him save as option.

    thatswhy i want this file as a read-only.

  5. #5
    Registered User
    Join Date
    12-12-2014
    Location
    PL
    MS-Off Ver
    2010
    Posts
    55

    Re: Save file as read-only

    Hmm in that case maybe a beforesave event could do the trick? I think I had some code that did just that. Ok. looked into this and if the end user would save a copy of the file he wouldn't be able to overwrite it either.

    There might be a simpler solution though, why not set up a password to modify the file? File -> Save as -> Tools -> General options -> Password to modify

    Try and let us know if that works for you.
    Last edited by JazzKult; 01-16-2015 at 09:39 AM.

  6. #6
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Re: Save file as read-only

    Try saving the file as a TEMPLATE. THen when the end user opens it they can edit but have to save it as a New Document.

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor mohan.r1980's Avatar
    Join Date
    09-18-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2010 (windows7)
    Posts
    729

    Re: Save file as read-only

    Its working fine
    thanks

+ 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. [SOLVED] Disable save and prevent "Do you want to save" message from prompting for read-only file
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 12:29 AM
  2. [SOLVED] How can I save an Excel file which says it's a Read only to a CD?
    By Cindy Who in forum Excel General
    Replies: 2
    Last Post: 03-24-2006, 07:19 PM
  3. Replies: 0
    Last Post: 11-29-2005, 10:00 PM
  4. [SOLVED] Trying to save a .XLA file that's Read Only
    By silkworm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2005, 09:25 PM
  5. How do I save a read only file or folder?
    By Dick in forum Excel General
    Replies: 3
    Last Post: 03-04-2005, 12:06 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