Worksheet_Calculate - Pop Out Message Box

jsull

New Member
Joined
Dec 12, 2013
Messages
3
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!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Thanks for the fast response!

Worksheet_change with the byVal Target does not seem to be working. It kinda works when I manually enter in the value in the cell, but not with the drop down linking to that cell.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top