+ Reply to Thread
Results 1 to 2 of 2

I need my macro to decect if a shared workbook is in use and cannot be edited and then do

  1. #1
    Registered User
    Join Date
    04-21-2013
    Location
    Californa
    MS-Off Ver
    Excel 2010
    Posts
    11

    I need my macro to decect if a shared workbook is in use and cannot be edited and then do

    I am on excel 2010 with workbooks on SharePoint. I have one missing part to my code. I have made a button to save and close my workbook. It is located on SharePoint so it opens as read only, requiring the code to press the edit workbook button and take it out of read only mode. I found a way to get this part done. The problem is that if another user is actually in the file, it stops my work around for the edit button. The code does a better explanation than I do.

    Please Login or Register  to view this content.
    So if someone else is editing the file, the ActiveWorkbook.lockserverflie command tries to push the "edit workbook" button and it fails and the "file in use" dialog box appears. I have no problem with the file in use box, I just need the code to allow for the file to actually be read only. This will not happen often but, I have low level users that have little tolerance for things out of the norm. (hence the save and close button)

    Thanks

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: I need my macro to decect if a shared workbook is in use and cannot be edited and then

    Hi,

    this is listing the users currently having the book open, so for your problem, if there is more than 1 person its in use:
    Please Login or Register  to view this content.
    Source

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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