A Critical Message

Last week a client mentioned that he uses lots of message boxes in his Excel code, and finds that users just click OK when a message appears. Most of the messages are informational, and users have read them before, so a quick click is fine.

However, some of those messages are critical, and only appear when an important decision has to be made. Because the users are so accustomed to seeing messages, they just click OK, without reading. That could cause problems!

I suggested that he add an icon to the critical messages, so they stand out from the rest.

Here's the current code for this message.

Type a plus sign after vbOKCancel and select vbCritical from the dropdown list.

Now when the macro runs, the critical icon appears in the message, and the user is more likely to read it.

You may also like...

7 Responses

  1. Ken Puls says:

    I’ve been tempted to use that message just to see if people are actually paying attention. ;)

  2. I have (in a distant past) once inserted one that just read “Anyone reading this is a moron”. Never had any feedback.

  3. Roger Govier says:

    Would you not be inclined to make the Cancel button the default as well?
    Make it a positive action that has to be taken by the user rather than blindly hitting the Enter key or clicking the mouse.

    MsgBox strMsg, vbOKCancel + vbCritical + vbDefaultButton2

    Along the lines of Jan Karel’s comment, one programmer employed in a previous company where I was a director, pleaded with me to let him keep a count of invalid user repsonses. When they responded incorrectly for the third time, he wanted to put up
    “You are either blind, or a complete !?*&%$ idiot. Kindly read the prompt on the screen”
    I was sorely tempted

  4. Stéphane says:

    For my personal use, i like using temporary msgbox for informational messages. It can be used with modeless userform or wscript shell.

  5. Jon Peltier says:

    vbCritical is like bold text. If you get in the habit of highlighting everything, in effect nothing will be highlighted,

  6. JP says:

    To expand on what Jon said, if you have “lots” of message boxes, you should rethink the design of your application. After three or four message boxes in the same app, even I would tune out.

    Your application should make it obvious what the correct input is for a particular step, and steer users towards entering the correct input. Something like a userform with a textbox and label, where the label font changes color if the input is invalid is also less obtrusive.

  7. Thanks for your comments! To clarify, the client has hundreds of templates, forms, etc., for his users, and each workbook might have 1 or 2 messages. Many of these just show a bit of info when the workbook is opened, and it doesn’t matter much if they’re read or ignored. The client wanted a quick way to draw attention to the very few important or critical messages that the users might encounter during the day.

    Roger, Jon and JP, I agree — the messages should have the logical option as the default, the worksheets should be well designed and that Critical icon should be used sparingly.

    Stéphane, I like the idea of temporary messages, and those could be used in any new applications.

    Ken and Jan Karel, maybe a few of those cryptic messages would wake up the users!

Leave a Reply

Your email address will not be published. Required fields are marked *