Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Phil Sanchez   on Mar 03 In MS Office Category.

  
Question Answered By: Luisa Fischer   on Mar 03

You probably want something like this. This code will check all the
cells on the worksheet whenever the Change event is triggered. If
your sample text is found, it will tell you the cell. I didn't test
this but hopefully it will help.


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rng As Range
On Error Resume Next
Set rng = Cells
If Not Intersect(Target, rng) Is Nothing Then
Set MyCell = Cells.Find(What:="11/21/2006", After:=Range
("A1"), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=True)
On Error Goto 0
MsgBox MyCell.Address & " contains what you're looking
for."
End If
Set rng = Nothing
End Sub

Share: 

 
 
Didn't find what you were looking for? Find more on Specific cell date value to trigger msg box Or get search suggestion and latest updates.


Tagged: