+ Reply to Thread
Results 1 to 2 of 2

Msgbox when trying to fill in cells before another cell is filled out

  1. #1
    Registered User
    Join Date
    06-16-2021
    Location
    Copenhagen, Denmark
    MS-Off Ver
    15.38
    Posts
    1

    Msgbox when trying to fill in cells before another cell is filled out

    Hi

    I am new into vba and I have got stuck with a code I can't find a solution for.

    What I want, is a message box to appear if the user tries to fill in values in a specific range of empty cells, before filling out one specific cell on another sheet first.

    So what the code needs to do, is to check if one cell on another sheet is empty, before you are allowed to fill in data in a range of other cells. If the cell is empty, a message box should appear as soon as the user clicks on one of the cells in the range.

    I am guessing that I should be using IsEmpty somehow, but I cannot figure out how to activate it just by selecting one of the cells in the range?


    Hope someone can help me with this

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Msgbox when trying to fill in cells before another cell is filled out

    You will probably want to have the code within the "Worksheet Change Event"
    There is a way to do it check the range
    You can take a look here:

    https://stackoverflow.com/questions/...range-is-empty

    Example:

    Please Login or Register  to view this content.
    within the Empty line above, you can add your statement to present the user, and if its not empty, meaning everything is filled in, then you can just skip that condition and remove it like this:

    Please Login or Register  to view this content.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

+ 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. If cell in Column G = X then fill 123 in Column H (and skip already filled cells)
    By MP1286 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2016, 01:14 PM
  2. Auto-Fill Column with the last cell in a row that is filled
    By excelnoob927 in forum Excel General
    Replies: 1
    Last Post: 04-08-2015, 05:58 PM
  3. Count filled and empty cells from the first filled cell in a row
    By mdaoust in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-01-2014, 01:23 PM
  4. [SOLVED] automatically fill cells because other cells have been filled - SEE OPENING POST
    By tlacloche in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-02-2013, 10:38 AM
  5. Replies: 12
    Last Post: 07-10-2012, 05:04 PM
  6. [SOLVED] Code is not making cells with no color filled. Can not apply NO FILL to spreadsheet.
    By Flowerski in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-01-2012, 08:35 AM
  7. Replies: 1
    Last Post: 10-11-2009, 04:59 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