+ Reply to Thread
Results 1 to 8 of 8

Save a Workbook Recommend Read Only

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Save a Workbook Recommend Read Only

    This workbook tracks transactions on parts so buyers can tell if they are in Inspection or the reject bin (DMR).


    I make a copy of the workbook, delete a page that's not needed and hide the other pages. Then I want to save the workbook as recommend read only.

    Please Login or Register  to view this content.
    I tried several variations and this version saves the workbook with the pages hidden, but not as read only recommended and it does not close the workbook. When I close the workbook, it closes without indicating that it was read only.

    I I put the read only recommended before the initial xlsR.Close True, the pages don't even get hidden.

    I am experiencing this issue with workbooks I copy and then modify. I do not seem to have the same issue with workbooks I open and then copy pages into.

    Change the path in Cell B26 (yellow highlight) to save the file on your system.

    [Edit] Had to delete data to get the attachment small enough to attach.
    Attached Files Attached Files
    Last edited by dflak; 03-03-2021 at 03:02 PM.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Save a Workbook Recommend Read Only

    I tried like this and the file becomes ReadOnlyRecommended:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Save a Workbook Recommend Read Only

    That comes out as a syntax error

    [Edit] It looked like one line in the mail preview
    Last edited by dflak; 03-03-2021 at 10:51 PM.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Save a Workbook Recommend Read Only

    I've already tried that in one of my many incantations.. The workbook does NOT come out as read only

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Save a Workbook Recommend Read Only

    Sorry, it always becomes ReadOnly for me. Without a dummy file to test I can't be of any other help.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Save a Workbook Recommend Read Only

    I had a file attached to the original post, but I had to delete some sheets to make it small enough to attach. When I did that, I broke it. So here is the repaired version.
    Attached Files Attached Files

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Save a Workbook Recommend Read Only

    This works for me:

    Please Login or Register  to view this content.
    Rory

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Save a Workbook Recommend Read Only

    This works, thank you.

    OK, you got me with a new one. xlsR.FullName - I've not seen FullName used before. I wonder why it works with that, but not PathName & "\" & FileName?

    Especially when Pathname & "\" & FileName works everywhere else.
    Last edited by dflak; 03-04-2021 at 05:36 PM.

+ 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. Enable Workbook Save via VBA for a Read Only workbook
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2019, 12:06 AM
  2. Replies: 1
    Last Post: 07-22-2018, 08:19 AM
  3. Save a single worksheet from a workbook as a separate read only workbook
    By jmking1999 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2017, 09:49 AM
  4. Replies: 1
    Last Post: 06-10-2015, 12:40 AM
  5. Make Workbook Read Only and not allowed to Save and Save As
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2012, 10:37 AM
  6. Save a workbook in read only
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-23-2009, 06:42 AM
  7. [SOLVED] want to 'share' a workbook but Says Read only'when others try save
    By Danielle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2005, 08:05 PM

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