+ Reply to Thread
Results 1 to 5 of 5

Stop Excel being closed if criteria not completed

  1. #1
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Stop Excel being closed if criteria not completed

    I am trying to figure out how to stop Excel from being closed by an operative if they haven't populated all obligatory cells.
    I am trying to stop the person from closing the workbook until they have completed cell C4 with a Yes or No.
    I assume that VBA is the way to go but I am not very good a writing it. I keep thinking If A4 > "", then a message comes up requesting that a Yes or No be placed in C4 before closing the workbook.
    I want the code to cover the whole of the columns, as different people use it and some do forget to include the required Yes or No.
    Of course, this sample is simplified.
    Would somebody be so kind as to give me a hand please?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-18-2014
    Location
    australia
    MS-Off Ver
    2015
    Posts
    43

    Re: Stop Excel being closed if criteria not completed

    i had this one in my saved notes, i've used it before. you'll just need to adjust the requirements to fit your own purpose of course

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Stop Excel being closed if criteria not completed

    Paste this macro in ThisWorkbook module :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Stop Excel being closed if criteria not completed

    Thank you so much every one. Life savers.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Stop Excel being closed if criteria not completed

    You are welcome

+ 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. Export data with two Criteria values from closed workbook to closed workbooks VBA
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2016, 01:56 PM
  2. Replies: 5
    Last Post: 07-22-2015, 03:18 AM
  3. [SOLVED] HELP PLEASE:- stop time counting if a different cell is completed
    By peckstar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-14-2015, 05:26 AM
  4. Replies: 3
    Last Post: 02-25-2013, 03:18 PM
  5. [SOLVED] Stop age when closed date entered
    By summer2010 in forum Excel General
    Replies: 5
    Last Post: 10-11-2012, 03:16 AM
  6. Replies: 4
    Last Post: 07-24-2011, 12:47 PM

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