+ Reply to Thread
Results 1 to 6 of 6

Open workbook if not readonly. If readonly try again.

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Open workbook if not readonly. If readonly try again.

    I am at a lost on how to acomplish a simple task.

    I want to be able to open a workbook using a VB macro but if it is read-only (in use by someone else), I want the script to keep trying until I am able to open the workbook with write access. Any help would be appreciated.


    Thanks,

    Met

  2. #2
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Open workbook if not readonly. If readonly try again.

    Is this what you are looking for?
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Re: Open workbook if not readonly. If readonly try again.

    Martinez:

    Thanks for the quick response. Unfortunately, when I run the script listed above, the workbook is opened regardless of the the files status. I should clarify, the file is located on a local network and I need to be able to modify and save the file hence the reason that I need it to be writable.

    Thanks,
    Met

  4. #4
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Re: Open workbook if not readonly. If readonly try again.

    Martinez:

    I used your suggestion as a starting point. The following code seems to work for my application:



    Please Login or Register  to view this content.
    Thanks,

    Met
    Last edited by Metrazal; 07-29-2014 at 02:53 PM.

  5. #5
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Re: Open workbook if not readonly. If readonly try again.

    Martinez:

    I used your suggestion as a starting point. The following code seems to work for my application:



    Please Login or Register  to view this content.
    Thanks,

    Met
    Last edited by Metrazal; 07-29-2014 at 02:54 PM.

  6. #6
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Open workbook if not readonly. If readonly try again.

    Great! Sorry my code wasn't working for you, but I know having a baseline always helps me.

    Best,
    Martinez

+ 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. Workbook Open ReadOnly
    By KRAND in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2011, 11:59 PM
  2. Replies: 2
    Last Post: 09-17-2009, 11:48 AM
  3. Making a workbook readonly
    By drgogo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2008, 07:14 AM
  4. Force a new workbook to be readonly with no macros
    By Jlong1980 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2006, 02:49 PM
  5. [SOLVED] Force a Readonly Workbook to save to a different folder
    By Charlotte Howard in forum Excel General
    Replies: 5
    Last Post: 08-17-2006, 09:00 AM

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