Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect,refresh then protect again
you have to set the Backgroundquery property of the query to False so the
code will wait for the refresh to complete. -- Regards, Tom Ogilvy "Deeds" wrote in message ... I am having a big problem trying to 1st. unprotect a sheet, in the same code run "refresh all", then protect the sheet again. I keep getting an error like it is trying to "refresh" after the sheet is protected again...Can anyone explain how I unprotect, refresh then protect again? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect,refresh then protect again
from help on Refresh for a querytable:
expression.Refresh(BackgroundQuery) expression Required. An expression that returns a PivotCache or QueryTable object. BackgroundQuery Optional Variant. Used only with query tables. True to return control to the procedure as soon as a database connection is made and the the query is submitted (the query is updated in the background). False to return control to the procedure only after all data has been fetched to the worksheet. If this argument isn't specified, the setting of the BackgroundQuery property determines the query mode. -- Regards, Tom Ogilvy "Deeds" wrote in message ... Thanks. Can I get you to ellaborate. Where do I make this setting? All I have now is code that "refreshes data". ----- Tom Ogilvy wrote: ----- you have to set the Backgroundquery property of the query to False so the code will wait for the refresh to complete. -- Regards, Tom Ogilvy "Deeds" wrote in message ... I am having a big problem trying to 1st. unprotect a sheet, in the same code run "refresh all", then protect the sheet again. I keep getting an error like it is trying to "refresh" after the sheet is protected again...Can anyone explain how I unprotect, refresh then protect again? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect, unprotect | Excel Discussion (Misc queries) | |||
Protect/Unprotect Worksheet | Excel Discussion (Misc queries) | |||
Is there any way that you can protect or unprotect a group of wor. | Excel Discussion (Misc queries) | |||
Protect/unprotect all worksheets | Excel Worksheet Functions | |||
Protect\Unprotect VBA project | Excel Programming |