Excel 2021/365 Security threat bcuz of "RefreshAll"

BrerRabbit

Board Regular
Joined
Aug 20, 2023
Messages
66
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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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