+ Reply to Thread
Results 1 to 4 of 4

Prevent file save until conditions are met

  1. #1
    Registered User
    Join Date
    08-30-2010
    Location
    Delhi, India
    MS-Off Ver
    Excel 2003
    Posts
    2

    Exclamation Prevent file save until conditions are met

    Hi Guys,

    I am new here and have a small problem, I am so glad to have found this forum

    Well I want to prevent users from saving the sheet if the following condition is not met:

    1.If any cell in column K contains "Query" in it then the cell next to it should have minimum 20 characters. (The current macro prevents users from saving when cell next to query is blank or "NA")
    2.It should check for all cells that contain the phrase "Query" before letting the user save the sheet. (Currently it saves the sheet after the first condition is met and does not continue to look further)
    3. Since multiple users will be using the sheet simultaneously unable to save error should come to only that user who has missed fulfilling the above condition and not to everyone.
    4. The macro should not make the sheet unresponsive while saving since multiple users will be saving the sheet constantly.

    This is the macro I am using currently:

    Please Login or Register  to view this content.
    I am really really great-full for all your help

    Thanks a lot
    Last edited by Varun_21; 08-30-2010 at 09:58 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Prevent file save until conditions are met

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then change your QUOTE tags to CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Prevent file save until conditions are met

    Hi,

    It's probably better if you upload the actual workbook so that we can see the request in context. However before doing so are you sure that you're getting the results you expect?

    Excel is essentially a single user system (and I leave aside the subject of the 'sharing' functionality which still requires conflicts to be resolved), meaning that the first person to open the workbook retains control. Anyone else opening it is only opening a read only copy and they cannot make changes and save the workbook with the same name. Your comment in 3 concerns me since you seem to be expecting subsequent users to be able to update the workbook.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-30-2010
    Location
    Delhi, India
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Prevent file save until conditions are met

    Hi Richard,

    I have added the sheet with comments with this reply. The third point of my original post refers to multiple users on a shared workbook. Since the sheet will be shared and multiple users will work on it I was just skepticle if the error will be ment for the user who did not meet the condition or to everyone on the sheet. I guess I was just getting a bit paranoid there, as far as I understand ti should work on the logic of user edit and give the error message to that specific user. Please tell me if I am wrong here.

    The main purpose of the macro is to get the user to enter a detail comment of the Query he faces in any particular case. He/She should not be able to proceed or Save till the time he gives a detailed comment in the cell adjescent to Query. This should not (I hope) hamper the work of others working on the shared workbook.

    Thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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