+ Reply to Thread
Results 1 to 3 of 3

Worksheet VBA to display message box

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Worksheet VBA to display message box

    Hi All,

    If it is not too much of an inconvenience to ask, I have the following workbook code, which basically will display a message box if it finds a 1, in range O5:O1004.

    Please Login or Register  to view this content.
    Would it be possible to amend it to include a second message box which will be displayed, if it finds a 2 in range P5:P1004?

    Appreciate a lot your kind help!

    Thanks


    Keibri

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Worksheet VBA to display message box

    Do you mean as well as or instead of.

    Trivially of course you could just add another block of code

    Please Login or Register  to view this content.
    Personally if there are checks like this that need to be made in VBA I find it easier to create an IF() type formula in Excel, give it a range name then read the value of that name in VBA and process accordingly. e.g. if the check name in Excel was a range called "Check", in VBA
    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 11-19-2016 at 06:53 AM.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Worksheet VBA to display message box

    Thanks for your suggestions !

+ 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] Worksheet change event code to display message box based on active cell offset content
    By Nitefox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2014, 02:52 PM
  2. [SOLVED] Display message box with value
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-08-2013, 12:37 PM
  3. [SOLVED] I need a message box to open up and display a message before printing.
    By Bobp84 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2012, 01:34 PM
  4. Is it possible to not display #DIV/0! message?
    By Lewis Koh in forum Excel General
    Replies: 9
    Last Post: 04-24-2010, 08:11 AM
  5. Display a message when worksheet is active
    By julvaz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2007, 05:20 PM
  6. Message Display - Upon Opening Worksheet
    By JennyW in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2006, 04:04 PM
  7. [SOLVED] Message Display
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-25-2005, 12:05 PM
  8. [SOLVED] Display a message in a worksheet
    By GGoodell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2005, 01:41 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