+ Reply to Thread
Results 1 to 5 of 5

VBA Message Box

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Bath, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    VBA Message Box

    Hi,

    I want to create a VBA message box that generates as follows:

    If the value in column X = "No" and then a value is inserted into column AH a dialogue box will appear stating "WARNING - X = No." This would logic would be applied to all cells in X and AH.

    I would use Data Validation normally, but one of the cells already has Data Validation applied.

    Can anyone help?

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,426

    Re: VBA Message Box

    You could use a Worksheet Change Event Handler monitoring column X.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    Bath, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: VBA Message Box

    Thanks for responding!

    I've not used a Worksheet Change Event Handler before. I've found some example code online, but not sure how to add the conditional monitoring of cell X...


    Private Sub Worksheet_Change(ByVal Target As Range)



    If Target.Address = "AH$13"

    MsgBox "This Code Runs When Cell A1 Changes!"

    End If


    End Sub

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,220

    Re: VBA Message Box

    Please Login or Register  to view this content.
    Artik

  5. #5
    Registered User
    Join Date
    04-11-2013
    Location
    Bath, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: VBA Message Box

    It works! Thank you so much 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. Replies: 1
    Last Post: 05-30-2018, 12:17 PM
  2. Adding an input message to each cell to bring back corrsponding message
    By Nic31 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2014, 09:28 AM
  3. An error message on open - a totally blank VBA message box
    By Mr_Tigas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-05-2013, 11:29 AM
  4. [SOLVED] How to pop up a warning message before any Excel automatic update link reminder message
    By billj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2013, 10:41 AM
  5. Extracting mail message(outlook) table in the message body
    By andywsw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2012, 10:14 PM
  6. need of pop up message dynamically using data validation input message method
    By vba_life in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2010, 09:03 AM
  7. [SOLVED] Intercept/replace standard 'cell protected' message with my own message?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2006, 10:35 AM

Tags for this Thread

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