![]() |
Unprotect sheet to "Refresh All" Access queries
I have a worksheet with several access queries.
I protected the worksheet to make sure that data and formulas aren't changed, then wrote macros to run the queries. I added an unprotect and protect statement to each macro, and it works great if I run the macros directly (Tools-Macro-Macros...). However, when I click "Refresh All" on the External Data toolbar, the queries won't run because of the protection. If I manually unprotect the sheet and click "Refresh All" it works fine, but doesn't reprotect the sheet. |
Unprotect sheet to "Refresh All" Access queries
Hi
If I understand you right, add a button from the command button menu to your sheet and use it to call your macro. Hopes it helps. Regards, Per "Horatio J. Bilge, Jr." skrev i meddelelsen ... I have a worksheet with several access queries. I protected the worksheet to make sure that data and formulas aren't changed, then wrote macros to run the queries. I added an unprotect and protect statement to each macro, and it works great if I run the macros directly (Tools-Macro-Macros...). However, when I click "Refresh All" on the External Data toolbar, the queries won't run because of the protection. If I manually unprotect the sheet and click "Refresh All" it works fine, but doesn't reprotect the sheet. |
Unprotect sheet to "Refresh All" Access queries
Thanks! That was simple.
"Per Jessen" wrote: Hi If I understand you right, add a button from the command button menu to your sheet and use it to call your macro. Hopes it helps. Regards, Per "Horatio J. Bilge, Jr." skrev i meddelelsen ... I have a worksheet with several access queries. I protected the worksheet to make sure that data and formulas aren't changed, then wrote macros to run the queries. I added an unprotect and protect statement to each macro, and it works great if I run the macros directly (Tools-Macro-Macros...). However, when I click "Refresh All" on the External Data toolbar, the queries won't run because of the protection. If I manually unprotect the sheet and click "Refresh All" it works fine, but doesn't reprotect the sheet. |
All times are GMT +1. The time now is 05:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com