Today I made pop-ups in my sheet, the only irritating thing is that they pop-up each time a cell in the worksheet is changed..
this is the code I used:
Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("Pop Up").Activate
Set Target = Range("C4")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on Brackets, Inform Supervisor Immediately!"
End If
Worksheets("Pop Up").Activate
Set Target = Range("C5")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on P/UP Cable, Inform Supervisor Immediately!"
End If
Worksheets("Pop Up").Activate
Set Target = Range("C6")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on Skew Screw, Inform Supervisor Immediately!"
End If
End Sub
How can I change it this way, I only want the pop-up to occur when the value in cells C4,C5 or C6 show "Shortage"..
I also want the pop-up to show up when the workbook is opened..
this is the code I used:
Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("Pop Up").Activate
Set Target = Range("C4")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on Brackets, Inform Supervisor Immediately!"
End If
Worksheets("Pop Up").Activate
Set Target = Range("C5")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on P/UP Cable, Inform Supervisor Immediately!"
End If
Worksheets("Pop Up").Activate
Set Target = Range("C6")
If Target = "Shortage" Then
MsgBox "Attention! Shortage on Skew Screw, Inform Supervisor Immediately!"
End If
End Sub
How can I change it this way, I only want the pop-up to occur when the value in cells C4,C5 or C6 show "Shortage"..
I also want the pop-up to show up when the workbook is opened..