Consulting

Results 1 to 2 of 2

Thread: Userform - Shared Wookbook - Error

  1. #1
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location

    Userform - Shared Wookbook - Error

    Hi there,

    I have a workbook(s) setup as shared.
    As this workbook is shared and is being used by several people there are occasions when and error occurs when trying to save it - "File locked for saving".

    In order to avoid conflicting cell errors I have the form save when it is opened and save before and after the data is sent from the userform to the worksheet.

    If the error occurs before the data is submitted to the worksheet then the data is lost. How can i avoid this from happening? Is there a better way to avoid conflicting errors than saving the workbook several times?

    Thanks,
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

  2. #2
    Good Evening.

    You could use an ErrorHandler for this. When the script Errors with "File locked for Saving." have it go to ErrHandler.

    In your ErrHandler region, set it up to wait X amount of seconds and then Resume. It will resume at the last line that errored out.

    Hope this idea helps.
    Scott
    You don't understand anything until you learn it more than one way. ~Marvin Minsky

    I never teach my pupils; I only attempt to provide the conditions in which they can learn. - Albert Einstein

Posting Permissions

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