+ Reply to Thread
Results 1 to 2 of 2

Code for a popup box if a certain value is selected

  1. #1
    Registered User
    Join Date
    11-28-2016
    Location
    Christchurch, New Zealand
    MS-Off Ver
    2013
    Posts
    6

    Code for a popup box if a certain value is selected

    Hello,

    I'm a beginner and am having some trouble getting a code to make a pop up box appear to work. I want to have a pop-up message if a certain selection from a drop down box is selected ( in this case Loess or silt from cell A9).

    I have been trying to use the following code:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)

    If Worksheets("Cover Sheet").Range("B9").Value = "FAIL" Then
    MsgBox ("Emily's message")
    End If
    End Sub

    but I can't seem to make it work. I have attached my spreadsheet.
    Any help would be appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Code for a popup box if a certain value is selected

    Need to put the code in the sheet module and not a Standard Module

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ 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. Code for a popup message
    By jslyuan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-11-2016, 05:03 PM
  2. Create a popup form with formulas to calculate the cell selected
    By Uberep3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2014, 02:43 PM
  3. [SOLVED] VBA code to popup a calender
    By mlafrance in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2014, 07:05 PM
  4. Popup input window when cell is selected
    By maneysm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 03:53 AM
  5. Popup of events through code
    By hopeyy1993 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2013, 08:44 AM
  6. Sheet or popup when cell selected
    By Southernw2002 in forum Excel General
    Replies: 1
    Last Post: 07-26-2012, 08:23 PM
  7. vba popup message code
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-23-2008, 04:38 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