Creating a macro for displaying a pop up box

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hi,

I've created a spreadsheet for keeping a selection of data. Once a cell reaches the number 10 I'd like a pop up box to appear saying "Jon now has a one match ban", then once the number I input reaches 20, I'd like it to repeat the pop up message, when the number is on 11, 12 etc then I'd like nothing to happen. How do I go about it?

Thanks,

Steve

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
lets say that value is in cell A2

popvalue = cells(2,"A")

'check if value is > 0 and is divisible by 10
if ((popvalue > 0) and (popvalue mod 10 = 0)) then
msgbox (" Jon now has a one match ban")
end if