BrerRabbit
Board Regular
- Joined
- Aug 20, 2023
- Messages
- 84
- Office Version
- 2021
- 2016
- 2013
- Platform
- Windows
I have two workbooks that are linked, with WB1 being the main workbook. WB1 has a Table of Contents which has links to open WB2. All data entry is in WB1 while being analysed in WB2.
WB2 has a worksheet with pivot tables and a dashboard. Instead of expecting the user to go to the ribbon and manually refresh the page, I've got vba code that when that sheet, is activated, I have one line of code that says:
Private Sub Worksheet_Activate()
ThisWorkbook.RefreshAll
End Sub
Has previously been working fine until today, with Microsoft cracking it about this one being a potentially dangerous macro and a runtime error of 1004. The sheet has no data entry whatsoever but does have links that ultimately come from WB1 via another worksheet, which is hidden. I got this source code from googling, except it was on worksheet change, so I changed it worksheet activate.
How do I resolve this issue?
WB2 has a worksheet with pivot tables and a dashboard. Instead of expecting the user to go to the ribbon and manually refresh the page, I've got vba code that when that sheet, is activated, I have one line of code that says:
Private Sub Worksheet_Activate()
ThisWorkbook.RefreshAll
End Sub
Has previously been working fine until today, with Microsoft cracking it about this one being a potentially dangerous macro and a runtime error of 1004. The sheet has no data entry whatsoever but does have links that ultimately come from WB1 via another worksheet, which is hidden. I got this source code from googling, except it was on worksheet change, so I changed it worksheet activate.
How do I resolve this issue?