+ Reply to Thread
Results 1 to 4 of 4

Code to open file read only mode in network

  1. #1
    Registered User
    Join Date
    05-26-2007
    Posts
    53

    Code to open file read only mode in network

    Hello everybody!
    I have an excel file in a folder shared in a network.
    I need the file to be opened in read only mode by everybody except one or 2 particular users.
    As logic, it goes something like this:

    If User <>”Jane Doe” or User <>”John Doe”
    Open in read only mode
    Else
    Open in read/write mode
    Endif

    But I don’t know how to code. Can anybody, please help?

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    Without any code just with a password at workbook level ! As people without the password can only open in read only mode …

  3. #3
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    419

    Re: Code to open file read only mode in network

    You could also protect the workbook, preventing other users from making changes. Another approach would be preventing other users from being able to save the workbook, e.g.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-26-2007
    Posts
    53

    Re: Code to open file read only mode in network

    Thank you! Both solution worked

+ 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. vba code to open xlsm file from Network Path
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2014, 04:18 AM
  2. VBA Code for file open, read, rename, delete
    By curiosity4learning in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2014, 11:05 AM
  3. Code to open read only file and fill in password
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2014, 05:04 PM
  4. Workbooks open in Read Only mode
    By Hook in forum Excel General
    Replies: 6
    Last Post: 03-14-2012, 11:27 PM
  5. Skip The Read Only Prompt When I Open A File - Excel, Open it read-write instead.
    By harry_1805 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2012, 02:14 AM
  6. Excel 2010 VBA code to determine username of open file on network
    By bcopland in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2011, 04:12 AM
  7. open the excel program in read only mode
    By pestw in forum Excel General
    Replies: 9
    Last Post: 11-05-2008, 04:59 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