I have a workbook with 6 PowerQuery tables, and one PowerQuery table to append the six into the one table.
The six are on hidden, unprotected sheets. However, I have the appended table on protected sheet.
When I have the protection off and I run my refresh macro the table updates fine. However, when the sheet is protected the table does not update.
My macro is set to unprotect the sheet, refresh, and then reprotect. However, what is is doing is; unprotecting, refreshing, and then reporotecting before the refresh is done.
I've tried adding in a wait before reprotecting, but this didn't help.
It seems my problem is that after the macro has finished running, the PowerQuery tables are still updating. How can I unprotect the sheet, refresh the tables, wait until the refresh is complete, and then reprotect the sheet?
Bookmarks