From: Aidan on
I have a worksheet and I want the date in Cell A5 to show current date if the
pivot table on the worksheet refreshes. Can someone provide the code?

I have another worksheet and I only want date in Cell E2 to update if any
edits were made in worksheet. Can someone give me code for this?

Thanks,

Aidan.
From: Paul on
Place this code in your worksheet code

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
range("E2").value = format(now(),"dd/mm/yyyy")
End Sub

--
If the post is helpful, please consider donating something to an animal
charity on my behalf.


"Aidan" wrote:

> I have a worksheet and I want the date in Cell A5 to show current date if the
> pivot table on the worksheet refreshes. Can someone provide the code?
>
> I have another worksheet and I only want date in Cell E2 to update if any
> edits were made in worksheet. Can someone give me code for this?
>
> Thanks,
>
> Aidan.