+ Reply to Thread
Results 1 to 2 of 2

Excel 2013 read-only file attribute problem

  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2013
    Posts
    26

    Excel 2013 read-only file attribute problem

    I have a macro that I wrote using Excel 2010 that before closing the workbook it would turn off the read only file attribute and save the workbook. I discovered that this doesn't work on Excel 2013 and produces an error because the file was opened as read-only. Has anyone got a work-around for this? I would like to keep the workbook saved as read only so other users do not alter it inadvertently. The macro reads in any new information and sets a flag indicating a save is required, then saves it prior to closing (and turning the read-only attribute back on).

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel 2013 read-only file attribute problem

    I don't have Excel 2013 so I cannot confirm\test this.

    One idea is to use the SETATTR Function before you open and after close a workbook to set the file's attribute to "Normal" (not read only).
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. EXCEL 2013 - opening read only files and editing them
    By sca1079 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2014, 09:03 PM
  2. Replies: 1
    Last Post: 10-04-2012, 08:11 AM
  3. Replies: 5
    Last Post: 06-05-2006, 08:30 AM
  4. tricky SQL problem using VBA Excel to read Access File
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2006, 06:55 PM
  5. [SOLVED] Export CSV File, set Windows Read-Only attribute
    By InNeedOfHelp! in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2005, 04:06 PM

Tags for this Thread

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