Hi,
I have code that pops out a message box when a cell (that is linked to a form control drop down box) is changed in between a specific range. The trouble I am having is that whenever I am entering in other inputs on the worksheet (think about a quoting worksheet with multiple inputs to derive a price), the message box pops out when the arguments are met. I would like to stop the code from running when not clicking on the drop down box to change the cell. I am using worksheet_calculate because I have linked data from the drop down box to another sheet in the workbook. I have tried application.intersect with no luck. I am stuck please help!!
Code:
Private Sub Worksheet_Calculate()
If ActiveSheet.Name <> "Basic Quote" Then Exit Sub
If Range("E7").Value > 19 And Range("E7").Value <> 33 Then
MSG1 = MsgBox("Is material diameter less than .100?", vbYesNo, "Material Special Pricing Check")
End If
If MSG1 = vbYes Then
MsgBox "Change material drop down to 'Special' and enter custom price per lb in E12"
Else
End If
End Sub
Thanks!
I have code that pops out a message box when a cell (that is linked to a form control drop down box) is changed in between a specific range. The trouble I am having is that whenever I am entering in other inputs on the worksheet (think about a quoting worksheet with multiple inputs to derive a price), the message box pops out when the arguments are met. I would like to stop the code from running when not clicking on the drop down box to change the cell. I am using worksheet_calculate because I have linked data from the drop down box to another sheet in the workbook. I have tried application.intersect with no luck. I am stuck please help!!
Code:
Private Sub Worksheet_Calculate()
If ActiveSheet.Name <> "Basic Quote" Then Exit Sub
If Range("E7").Value > 19 And Range("E7").Value <> 33 Then
MSG1 = MsgBox("Is material diameter less than .100?", vbYesNo, "Material Special Pricing Check")
End If
If MSG1 = vbYes Then
MsgBox "Change material drop down to 'Special' and enter custom price per lb in E12"
Else
End If
End Sub
Thanks!