Excel 2021/365 Security threat bcuz of "RefreshAll"

BrerRabbit

Board Regular
Joined
Aug 20, 2023
Messages
84
Office Version
  1. 2021
  2. 2016
  3. 2013
Platform
  1. 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?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top