Refreshing query on protected workbook - Something new with Office update?

jfeel

New member
Joined
Apr 17, 2018
Messages
1
Reaction score
0
Points
0
Location
Texas
Excel Version(s)
2016
In a model I built, there are a few sheets I have set up so that once the user activates a worksheet, the query will refresh.
Usually this just requires that the worksheet is unprotected. I have it set up in VBA to unprotect sheet, refresh query, then protect sheet again.
The workbook structure is password protected at the time, and it usually works fine.

I don't know if this stems from a recent Office Update, but now if the workbook is protected, the query will not refresh.
It pops up a VBA error because the Query cannot refresh.
The source table is on a hidden sheet within the workbook.

I can change the VBA to include unprotecting the workbook, then protecting it after the refresh.
Not a big deal, but:
1. There are several dozens copies of this model in use and would be a pain to go in and change the code for each one.
2. I would like to password protect the workbook. I think it is possible to include that part in the VBA, but from experience unprotecting and protecting a worksheet with a password in VBA, it was problematic.
For those sheets that I have the worksheet unlocking and locking, the sheet is protected, but without a password.
I've found it more reliable to protect/unprotect in VBA without a password.

There are many hidden sheets that having the workbook structure password protection provides some level of security from prying eyes. Would like to keep it that way.

Just wondered if anyone has ran into this.
Maybe has something to do with updates in the first half of April 2018.
I'm on Version 1803 (Build 9126.2152) Monthly Channel.
 
Back
Top