hi,
I have a drop down selection of the items listed on A1:A6 like below. The point of this is to execute a macro based on the items selected (MsgBox will appear for each items selected).
I also have a code saved in 'ThisWorkbook' as follows:
However, when I go back and make my selection, the MsgBox doesn't pop up. I tried testing the MsgBox capabilities by inserting the code in Module and it works fine over there. What am I doing wrong?
Thank you.
I have a drop down selection of the items listed on A1:A6 like below. The point of this is to execute a macro based on the items selected (MsgBox will appear for each items selected).
I also have a code saved in 'ThisWorkbook' as follows:
VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Not Intersect(Target, Range("B2")) Is Nothing Then
Select Case Range("B2")
Case "Hurricane"
MsgBox "This is Hurricane!"
Case "Earthquake"
MsgBox "This is Earthquake!"
Case "Typhoon"
MsgBox "This is Typhoon!"
Case "Tsunami"
MsgBox "This is Tsunami!"
Case "Tornado"
MsgBox "This is Tornado!"
Case "Blizzard"
MsgBox "This is Blizzard!"
End Select
End If
End Sub
However, when I go back and make my selection, the MsgBox doesn't pop up. I tried testing the MsgBox capabilities by inserting the code in Module and it works fine over there. What am I doing wrong?
Thank you.