Results 1 to 2 of 2

Message box with cell value in the message

Threaded View

  1. #1
    Registered User
    Join Date
    07-14-2020
    Location
    Vancouver, Canada
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Message box with cell value in the message

    I am trying to make a message box pop up when a value is entered in a cell range and have the message show the value in a corresponding cell range.

    I've got Flight numbers in column $B7 and Departure times in column $J7.
    When a departure time is entered I want a message box to pop up with a message that the corresponding flight has departed.
    For example, if the Departure time is entered in J13, I want the message to include the Flight number in B13.

    This is what I have:

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim xCell As Range, Rg As Range
        On Error Resume Next
        Set Rg = Application.Intersect(Target, Range("J7:J28"))
        If Not Rg Is Nothing Then
            For Each xCell In Rg
                If xCell.Value > 0.01 Then
                    MsgBox "Aircraft Departed " & Range("B7:28"), vbInformation, "DEPARTURE"
                    Exit Sub
                End If
            Next
        End If
    End Sub
    I know the error is in & Range("B7:28").

    Thank You!

    edit: formatting
    Last edited by GCHVFX; 07-15-2020 at 01:41 PM.

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. [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
  4. [SOLVED] VBA message box with cell values in the message
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2012, 10:29 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