How Create Pop-Up Msg when item selected in List Box?

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

How do I have a message box or pop-up message occur when a user selects a
specific valid entry from a "list" for a cell?

Details: For a cell, I did a Data, Validation, List. I created a list of 4
valid entries (box, kite, crayon, fish) the user may select. When the user
selects entry crayon, I want a message to pop up, example " Be sure to
specify the colors later."

Thanks,
rick
(e-mail address removed) (<= remove "Z"s for valid email.)
 
Rich

You could use a worksheet change event. The code below will present a
message box on each entry. Test it with validation first. As written it
only works with entries in column A (The code goes behind a worksheet in the
workbook. Right click on a sheet tab and select 'View code'. Paste the code
in the resultant window)

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Columns("A:A")) Is Nothing Then
Select Case Target.Value
Case Is = "Crayon"
MsgBox "Select colour later", vbOKOnly, "Crayons"
Case Is = "Kite"
MsgBox "Select shape later", vbOKOnly, "Kites"
Case Is = "Fish"
MsgBox "Select species later", vbOKOnly, "Fishes"
Case Is = "Box"
MsgBox "Select size later", vbOKOnly, "Boxes"
Case Else
Exit Sub
End Select
End If
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Back
Top