Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is it possible to force Excel to not open a workbook in read-only if another user already has it open?
    e.g. if someone else is using the spreadsheet do not allow anyone else to open it?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't think that's possible.

  3. #3
    New Lounger
    Join Date
    Nov 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='783330' date='07-Jul-2009 13:52']I don't think that's possible.[/quote]

    Thanks Hans.
    I thought as much, but it's always good to ask just in case.

  4. #4
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='st321st' post='783326' date='07-Jul-2009 08:33']Is it possible to force Excel to not open a workbook in read-only if another user already has it open?
    e.g. if someone else is using the spreadsheet do not allow anyone else to open it?[/quote]
    Assuming that you will NOT be working in an environment with malicious users, the following code could be placed in the Workbook module.
    Code:
       Private Sub Workbook_Open()
    	   If ThisWorkbook.ReadOnly Then ThisWorkbook.Close False
       End Sub
    Regards
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •