View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Workdheet.BeforeChange

No, by definition it is the selection change in the worksheet cell that
triggers the event. If the user is changing something they should not,
consider locking the relevant cell(s) and protecting the sheet.

You could use the Worksheet_SelectionChange(ByVal Target As Range), this
tells you the cell(s) target just entered.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Target.Formula
End Sub

--

Regards,
Nigel




wrote in message
...
When I use

Private Sub Worksheet_Change(ByVal Target As Range)

og a cell containing a formula, Target.Formula is the Formula after
the change has happened. Is there any way to get the Formula that is
in the cell BEFORE the change happens? I cannot use

Private Sub Worksheet_SelectionChange(ByVal Target As Range) to grab
the formula, as the user is not necessarilu selecting the cell before
the change.

Regards
Jan