Creating a macro for displaying a pop up box

Closed
Steve - Mar 22, 2010 at 07:36 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 23, 2010 at 08:06 AM
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
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 23, 2010 at 08:06 AM
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
0