VBA code to pop up message from multiple values of cell B3

SIPRIAN

New Member
Joined
Nov 10, 2016
Messages
36
HI
I want a message box to automatically appear when Cell B3 from Sheet2 has one of the values below.

789, 456, 321, 741, 852

these values can be added in the script or I can add them on column B , B20 to B24

Thank you!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
After doing some tests, the macro is working for values that it not suppose to work.
if cel B# in Sheet2 is 888, the message pops up and is not suppose to do that. Ho w can I make the message pop up only for those values?
I don't think that is possible.
Are you saying that the formula in cell B3 on Sheet2 is returning the value 888, and the code is firing?
 
Upvote 0
if I type one of the numbers in sheet2 cell B3 , the macro is working( is suppose to work), if the value is copied with any of the formulas (=Sheet1!D8, or =+Table_Query_12[supplier_id]) to sheet2 B3, the macro doesn't work( the message is not suppose to show the message)

L.E. if I type in sheet1 D8 value 888 , this values i copied to Sheet2 cell B3. "the code is firing"
if I type 888 in Sheet2 B3, the the code is NOT firing
 
Upvote 0
Did you use Worksheet_Calculate like we instructed?
It sounds like you are using Worksheet_Change instead.

Don't try typing in anything we gave you, use Copy/Paste to make sure you have everything EXACTLY as we have given you.
 
Upvote 0
Did you use Worksheet_Calculate like we instructed?
It sounds like you are using Worksheet_Change instead.

Don't try typing in anything we gave you, use Copy/Paste to make sure you have everything EXACTLY as we have given you.
you were right, it was Worksheet_Change instead.. I copied the vba however,the Worksheet_Change didnt chage to Worksheet_Calculate
 
Upvote 0
you were right, it was Worksheet_Change instead.. I copied the vba however,the Worksheet_Change didnt chage to Worksheet_Calculate
Sounds like you just copied the inner part of the code and not the Sub line.
If you do copy the sub line over, it will reflect that (the VB Editor won't change anything automatically on its own).
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,637
Latest member
Ezio2866

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