I am still quite new to VBA and have run into an issue with my msgbox function. Essentially I am selecting a name from a drop down list, If a certain name is selected a message box should pop up. For some reason it does not want to fire even when the condition is true. EDIT: new Code below:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("Selected_PC")) Is Nothing Then
If Range("Selected_PC").Value = "S&S - Marine" Then
MsgBox "Please be aware, for this profit center the template will not produce a result for the Underwriter assignment. If an Underwriter sent in the submission refer to that Underwriter."
End If
End If
End Sub
Code placement was my issue. I originally was attempting to add the code to my module where I created my user defined function for "Selected_PC". I moved the code to the worksheet in which the target cell is located. This seemed to do the trick. Rookie move by calling a worksheet change in a module...live and learn I guess. Thank you all for the help!