View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Vergel Adriano[_2_] Vergel Adriano[_2_] is offline
external usenet poster
 
Posts: 12
Default Pop up message upon specific cell entry?

Try pasting this in the code module of your worksheet. It traps the Change
event. It assumes that the column to watch is column A. If you enter a "0"
in any row of column A, you get a message box where you can say Yes or No.
If you say Yes, it allows you to proceed, if you say No, it clears the cell.

This will work when the change involves only one cell. If you paste "0" for
example to multiple rows in column A, it will not do anything.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count 1 Then Exit Sub

If Target.Column = 1 Then
If IsNumeric(Target.Text) And Target.Value = 0 Then
If vbNo = MsgBox("Are you certain this entry is correct?",
vbYesNo + vbQuestion) Then
Target.Value = ""
Target.Select
End If
End If
End If
End Sub



"matt ball" wrote in message
...
Is there a way to set up a column that any time a "0" is entered in any
cell
in that column then a pop up message will display? Saying something like:
"Are you certain this entry is correct?"

I have very little experience with writing macros, but am otherwise
generally well-versed in Excel. Data validation is quite capable of this
function... I don't think.

Any help would be appreciated.




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----