dwarnimont
Board Regular
- Joined
- Jan 12, 2010
- Messages
- 71
Asking for help to create VBA code for a message box.
Objective: A targeted cell, using a list dropdown with several options posts a message if a specific string is selected from the list
Part 1: If a list dropdown option is selected (change) containing a specific text string (or value?), a messagebox will popup with a specific message.
Part 2: the yes/no, if/else branch. I have the second part of the code , but I don’t know how to create the first part.
Sub SayHello()
Msg = "message to user "
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then
MsgBox "Oh, never mind."
Else
MsgBox "I must be clairvoyant!"
End If
End Sub
Thanks,
David
Objective: A targeted cell, using a list dropdown with several options posts a message if a specific string is selected from the list
Part 1: If a list dropdown option is selected (change) containing a specific text string (or value?), a messagebox will popup with a specific message.
Part 2: the yes/no, if/else branch. I have the second part of the code , but I don’t know how to create the first part.
Sub SayHello()
Msg = "message to user "
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbNo Then
MsgBox "Oh, never mind."
Else
MsgBox "I must be clairvoyant!"
End If
End Sub
Thanks,
David