+ Reply to Thread
Results 1 to 5 of 5

delay message box appearance

  1. #1
    Registered User
    Join Date
    05-16-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    3

    delay message box appearance

    Hello, I have the following code which is working well but I am getting too many message boxes - I would like to delay the box to give the user time to enter the correct data.

    here are the spreadsheet cell references
    Product 1 Product 2
    Area m2 D131 D202
    Zone 1 D133 D204
    Zone 2 D135 D206
    Zone 3 D137 D208
    Zone 4 D139 D2010
    Zone 5 D141 D212
    Zone 6 D143 D214

    Cell "F" is totaling all of the zone cells and the code below is to say that if the zone cells do not match the 'Area m2' cell then display the message box - I need the message to be delayed about 30 seconds or 1 minute to allow time to fill in the 'Zone' cells.

    here is the code that I have so far :

    Private Sub worksheet_change(ByVal target As Range)
    If Range("f131") <> Range("d131") Then
    MsgBox "WARNING zone areas do not match Total Area"
    Else
    If Range("f202") <> Range("d202") Then
    MsgBox "WARNING zone areas do not match Total Area"
    End If
    End If
    End Sub

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

    Re: delay message box appearance

    .
    It might be a better approach to check the sheet PRIOR to the workbook being closed - then display the MESSAGE BOX if necessary ?

  3. #3
    Registered User
    Join Date
    05-16-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    3

    Re: delay message box appearance

    Hi Logit, thanks for your message.
    Hmmm the concern there is that the workbook is used for quoting and often the workbook is not closed prior to transferring the price into the quote letter.
    If it's possible to delay the message box that would be the preferred solution - however if not, then how would I modify the code to trigger when closing the
    workbook?

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

    Re: delay message box appearance

    .
    The best I can suggest is to use Conditional Formatting for the cells ... if the second cell doesn't equal the first cell then change the second cell background color to red (or any preferred color).

    If you believe the sales rep would comply, you could also add a CommandButton that runs a macro checking if the cell values match .. and if not .. then present a MsgBox. The rep could be instructed to
    always click that button when they believe all information has been entered and the quote is ready for presentation.

    With the above measures, the rep has the immediate visual response when the values don't match ( auto disappears when the value do match ), plus a second check before presenting the quote.

    Maybe someone else on the FORUM has the solution to delaying a MsgBox ?

  5. #5
    Registered User
    Join Date
    05-16-2016
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    3

    Re: delay message box appearance

    Thanks Logit - your feedback is appreciated.

    If anyone else can help me with the delaying the message box, please let me know as soon as possible

+ 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. How to write a formula that will prevent appearance ERROR MESSAGE
    By CLR in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 10:05 AM
  2. How to write a formula that will prevent appearance ERROR MESSAGE
    By CLR in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 07:05 AM
  3. How to write a formula that will prevent appearance ERROR MESSAGE
    By CLR in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  4. How to write a formula that will prevent appearance ERROR MESSAGE
    By Huriiii in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. How to write a formula that will prevent appearance ERROR MESSAGE
    By Huriiii in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. How to write a formula that will prevent appearance ERROR MESSAGE
    By Huriiii in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. How to write a formula that will prevent appearance ERROR MESSAGE
    By Huriiii in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] How to write a formula that will prevent appearance ERROR MESSAGE
    By Huriiii in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-21-2005, 08:05 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