+ Reply to Thread
Results 1 to 3 of 3

If cell is empty then lock the next one and don't save the file

  1. #1
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    If cell is empty then lock the next one and don't save the file

    Hi,

    I have a file that has a number of columns in which the users will have to add data. But I want them to add all the data to be used on a later stage as until now they've skipped some important information.
    What I am trying to do is:

    If A2 is empty then B2 is locked;
    if B2 is empty then D2 is locked;
    If D2 is empty then E2 is locked;
    If E2 is empty then F2 is locked;
    If F2 is empty then G2 is locked;
    If G2 is empty then H2 is locked;
    If H2 is empty then I2 is locked;
    If I2 is empty then J2 is locked.

    Also, if they have not completed the conditions above, then they cannot save the file.

    Is it possible only via VBA?

    Thanks,
    Paul
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: If cell is empty then lock the next one and don't save the file

    Something like this
    - test in attached workbook

    In sheet module:
    Please Login or Register  to view this content.

    In ThisWorkbook module:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kev_; 02-19-2018 at 01:04 PM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: If cell is empty then lock the next one and don't save the file

    Hi Kev,

    Thank you for your response and the code. It works like a charm. You sir, saved me from a lot of workaround.

    Regards,
    Paul

+ 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. ActiveWorkbook.Save in macro causing file to lock
    By jackirby in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2016, 03:11 PM
  2. Automatically lock a cell on save, if it contains a date
    By michaelcouch87 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-11-2015, 08:32 AM
  3. [SOLVED] Edit cell reference only for save as path, macro lock
    By ntljennifer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-28-2014, 04:55 AM
  4. Replies: 1
    Last Post: 08-29-2013, 07:29 AM
  5. how do i lock a cell? to save formula or function in it?
    By Ajay Upmaneu in forum Excel General
    Replies: 1
    Last Post: 07-04-2006, 05:17 AM
  6. Replies: 3
    Last Post: 04-24-2006, 03:54 AM
  7. Replies: 0
    Last Post: 04-10-2006, 10:40 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