mnmgal
New Member
- Joined
- Jan 9, 2025
- Messages
- 1
- Office Version
- 365
- 2024
- 2021
- 2019
- 2016
- Platform
- Windows
Hi,
Can someone please check my VBA code? I only have 2 components, one to change the sheet name to match cell C114 and the other to automatically refresh the pivot table when the source data changes (theyre both on the same sheet). Thank you
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Name = ActiveSheet.Range("C114").Value
Application.EnableEvents = False
ThisWorkbook.RefreshAll
Application.EnableEvents = True
End Sub
Can someone please check my VBA code? I only have 2 components, one to change the sheet name to match cell C114 and the other to automatically refresh the pivot table when the source data changes (theyre both on the same sheet). Thank you
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Name = ActiveSheet.Range("C114").Value
Application.EnableEvents = False
ThisWorkbook.RefreshAll
Application.EnableEvents = True
End Sub