+ Reply to Thread
Results 1 to 2 of 2

Excel Command line switch for 'read only' shortcut not working

  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    United States
    MS-Off Ver
    Office 14/15
    Posts
    2

    Excel Command line switch for 'read only' shortcut not working

    How's it? I've learned a lot by surfing through this forum but haven't been able to resolve this problem on my own.

    I've recently created a macro which takes a .csv file and scrubs the data and dresses it up for a report. I've finally got it running without any problems and have added it individually to 5 different user accounts on my network as an add-in, but need a way to share it across a computer network without allowing others to edit the file.

    The report is generated multiple times a day by the different users, none of whom are very computer literate (not that I am much better, myself), and the macro over-writes the old file each time. I've read that it's possible to simply create a shortcut to the file that automatically opens the spreadsheet in read-only format, which would be perfect for what I'm trying to do, but I haven't been able to get it to work so far.

    My current shortcut pathway is similar to this:

    "C:\Program Files\Microsoft Office\Office15\EXCEL.EXE" /R "C:\Users\Ben\Documents\OT Master.xlsx"

    On my computer at work (Windows 7) the shortcut simply opens the spreadsheet so that anyone can edit it, instead of as a read-only file. On my computer at home (I'm trying to experiment) (windows 8.1) it won't even let me save the shortcut, saying I need to provide administrator permission & then cutting to a window that says "access denied".

    I won't have the pathway for the actual file I'm trying to create a shortcut for until tomorrow when I get back to work, but I've formatted it essentially the same, directing to the excel.exe file, running the switch "/R", and then directing it to the actual file location. Anything I'm missing?

    The ultimate goal is to have multiple people be able to view the file without locking out those who need to update it. I'd prefer not to have to go back into the macro as I'm likely to mess it up rather than fix it, but I can try that if there is an easier/better way to do this.

    Thanks!

  2. #2
    Registered User
    Join Date
    03-18-2013
    Location
    United States
    MS-Off Ver
    Office 14/15
    Posts
    2

    Re: Excel Command line switch for 'read only' shortcut not working

    Got it to work somehow. For anyone who was looking or runs into the same issues, the target address I used ended up being

    "C:\Program Files\Microsoft Office\Office14\EXCEL.EXE" /R "H:\Fire\_Division Private\ERS\OT Report\OT Report.xlsm"

    Not sure what changed, but it's opening as a Read-only file now. I'll be able to send out a memo so everyone can access the file and view it without affecting the few people who need to make changes to it. Hope this helps someone in the future.

+ 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. Command Line Switch
    By StillLearning2 in forum Excel General
    Replies: 1
    Last Post: 10-12-2009, 12:30 PM
  2. Hyperlink to executable with command line switch
    By benAz in forum Excel General
    Replies: 0
    Last Post: 10-10-2009, 01:25 PM
  3. [SOLVED] What is the command-line print switch in Excel?
    By eeidfn in forum Excel General
    Replies: 5
    Last Post: 02-17-2006, 08:10 PM
  4. shortcut with command line switch probs
    By solotoo in forum Excel General
    Replies: 1
    Last Post: 11-11-2005, 11:50 AM
  5. Is there a command line "switch" To close Excel
    By Randy Wayne in forum Excel General
    Replies: 2
    Last Post: 08-22-2005, 05: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