+ Reply to Thread
Results 1 to 4 of 4

Problem with Message Prompts

  1. #1
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Problem with Message Prompts

    Hi,

    I have the following code and the message prompts aren't cooperating the way I need them to. Basically, the code looks at 3 different cells one at a time to check if they are blank or not and provides a message to the user if it finds any that are blank and then exits before creating a new record. The problem I'm having with it is with the 3rd cell (D6) being blank and no message popping up AND that if all three cells (B6 through D6) contain a value, it isn't continuing to create a new record. ?? Can anyone see where I'm making a mistake? Thanks for your help!

    Please Login or Register  to view this content.
    -------------
    Tony

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Problem with Message Prompts

    I didn't look closely at your code's logic, but be aware that if you have a cell with a formula that returns "" (an empty string but still a string), the IsEmpty function will return a False on that cell. That cell is not considered to be empty by IsEmpty.

    You could test a formula-cell that returns a "" with...
    If Cell.Value = "" then

    Do you have formulas that may return "" in any of the three different cells ?
    Last edited by AlphaFrog; 04-07-2014 at 06:05 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Problem with Message Prompts

    Try this:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Problem with Message Prompts

    stnkynts, thanks very much for your reply! Works exactly how I was trying to make it. And so much more elegant than my attempt.

    AlphaFrog, thank you as well. I'm slowly trying to learn VBA... I sometimes end up looking for and find something similar to what I need and then try to manipulate it to my ends. Usually I'm able to figure it out just by reading many helpful threads on this site and others but I'm not really to a point yet where I can write my own full code. Thanks for your help.

+ 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. [SOLVED] message Box problem
    By star18 in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 01-07-2014, 05:27 AM
  2. Problem with prompts while saving and reading from an excel file
    By flat_pro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2013, 02:07 PM
  3. [SOLVED] Input Box prompts Message Box
    By cfherd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-04-2012, 09:46 AM
  4. Adding Message Prompts
    By John Bates in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2010, 10:59 PM
  5. message box problem
    By marcmarc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2006, 10:13 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