ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Validation message popu-up (https://www.excelbanter.com/excel-discussion-misc-queries/96832-data-validation-message-popu-up.html)

Hank

Data Validation message popu-up
 
I have a cell to check if it is zero balance, if not, there is a pop-up
message show up to warm people. I tried to use Validation function, but it
only work when you input the data in the cell, but the cell I want it take
effect is fomulated. I can use Conditional Format function, but I want to be
more active to have pop-up message appear when it is invalid. Can anyone
expert help?

Thanks a GREAT!!

Hank

Bob Phillips

Data Validation message popu-up
 
Private Sub Worksheet_Calculate()
If Range("K1").Value = 0 Then
MsgBox "Value is 0"
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hank" wrote in message
...
I have a cell to check if it is zero balance, if not, there is a pop-up
message show up to warm people. I tried to use Validation function, but it
only work when you input the data in the cell, but the cell I want it take
effect is fomulated. I can use Conditional Format function, but I want to

be
more active to have pop-up message appear when it is invalid. Can anyone
expert help?

Thanks a GREAT!!

Hank





All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com