Prompt When User Changes a Cell

J

Joe Firefighter

I'm an Access user and would like to know if there is some function in excel that will prompt the user if information is changed in a cell. For example, if a date is changed in a cell, I would like it to prompt the user when they leave the cell to make sure they are aware that a change is being made. Thanks
 
E

Earl Kiosterud

Joe,

Any cell?

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "You changed the cell" ' use one or the other msgbox
MsgBox "You changed cell " & Target.Address & " to " & Target.Value
End Sub

A particular cell?

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
MsgBox "You changed the cell to " & Target.Value
End If
End Sub

A column?

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1").EntireColumn) Is Nothing Then
MsgBox "You changed cell " & Target.Address & " to " & Target.Value
End If
End Sub

This goes in the sheet module, or the workbook module, for all sheets, if
you change the first line to
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

Joe Firefighter said:
I'm an Access user and would like to know if there is some function in
excel that will prompt the user if information is changed in a cell. For
example, if a date is changed in a cell, I would like it to prompt the user
when they leave the cell to make sure they are aware that a change is being
made. Thanks
 
Top