Refreshing a pivot table from a data model connected to a db

%3CLINGO-SUB%20id%3D%22lingo-sub-2461818%22%20slang%3D%22en-US%22%3ERefreshing%20a%20pivot%20table%20from%20a%20data%20model%20connected%20to%20a%20db%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2461818%22%20slang%3D%22en-US%22%3E%3CP%3EGeneral%20situation%3A%3C%2FP%3E%3CP%3Ewe%20have%20our%20work%20data%20in%20a%20database%20which%20I%20load%20into%20a%20data%20model%20where%20I%20set%20up%20my%20requirements%20via%20power%20query%20and%20the%20results%20then%20get%20loaded%20into%20a%20pivot%20table.%20On%20top%20of%20that%20I%20created%20a%20mask%20to%20enter%20a%20date%20and%20a%20selec%20string%20gets%20created%20which%20I%20successfully%20inject%20into%20the%20data%20model%20so%20the%20actually%20wanted%20data%20gets%20loaded%20into%20the%20data%20model.%20This%20works%20via%20a%20macro%20that%20simply%20injects%20a%20cell%20-%20containing%20the%20formula%20-%20into%20the%20data%20model%20and%20simply%20executes%20a%20ActiveWorkbook.RefreshAll().%20This%20works%20flawlessly%20for%20me%20-%20who%20made%20the%20file%20-%20and%20I%20get%20data%20loaded%20into%20the%20model%20only%20from%20the%20given%20date%20and%20the%20pivot%20also%20automatically%20updates%20and%20shows%20the%20relevant%20entries%20of%20the%20yesterday.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%3A%3C%2FP%3E%3CP%3EWhen%20my%20teammates%20hit%20the%20update%20macro%20Excel%20opens%20a%20prompt%20asking%20about%20security.%20They%20then%20have%20to%20check%20the%20box%20saying%20to%20ignore%20the%20security%20and%20save.%20It%20updates%20for%20them%20then.%20However%2C%20they%20have%20to%20do%20this%20every%20time%20they%20reopen%20the%20file%20unless%20they%20save%20the%20file%20itself%20-%20which%20they%20shouldn't%20do%20so%20they%20can't%20accidently%20bust%20up%20formulars%20-%20and%20even%20then%2C%20only%20the%20one%20who%20last%20saved%20it%20doesn't%20get%20prompted%20again.%3C%2FP%3E%3CP%3EExample%3A%20I%20-%20the%20creator%20-%20can%20always%20update%20without%20an%20extra%20prompt%2C%20no%20matter%20what.%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BMember%20A%20updates%2C%20checks%20the%20%22ignore%22%2C%20saves%20the%20prompt%20and%26nbsp%3B%3CSPAN%3Ethen%20saves%20the%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20whole%20file.%20He%20can%20now%20always%20update%20without%20the%20extra%20prompt.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BMember%20B%20updates%20and%20gets%20the%20prompt.%20If%20he%20checksand%20saves%20%22ignore%22%20and%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20then%20saves%20the%20whole%20file%2C%20he%20can%20now%20always%20update%20without%20the%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20extra%20prompt%2C%20but%20now%20Member%20A%20lost%20that%20privilege%20and%20as%20soon%20as%20he%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20updates%20he%20gets%20the%20extra%20prompt%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20understand%20what%20exactly%20is%20happening%20here.%20Especially%20because%20the%20older%20files%20simply%20work%20with%20a%20table%20-%20db%20data%20gets%20imported%20into%20an%20actual%20Excel%20table%20instead%20of%20a%20data%20model%20-%20and%20that%20works%20just%20fine%20without%20any%20extra%20prompts.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20generally%20disable%20this%20security%20prompt%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20attach%20a%20screenshot%20of%20the%20prompt%2C%20in%20german%2C%20though.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help%20in%20advance.%3C%2FP%3E%3CP%3Ewith%20best%20regards%2C%20ciradan.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2461818%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

General situation:

we have our work data in a database which I load into a data model where I set up my requirements via power query and the results then get loaded into a pivot table. On top of that I created a mask to enter a date and a selec string gets created which I successfully inject into the data model so the actually wanted data gets loaded into the data model. This works via a macro that simply injects a cell - containing the formula - into the data model and simply executes a ActiveWorkbook.RefreshAll(). This works flawlessly for me - who made the file - and I get data loaded into the model only from the given date and the pivot also automatically updates and shows the relevant entries of the yesterday.

 

Problem:

When my teammates hit the update macro Excel opens a prompt asking about security. They then have to check the box saying to ignore the security and save. It updates for them then. However, they have to do this every time they reopen the file unless they save the file itself - which they shouldn't do so they can't accidently bust up formulars - and even then, only the one who last saved it doesn't get prompted again.

Example: I - the creator - can always update without an extra prompt, no matter what.

               Member A updates, checks the "ignore", saves the prompt and then saves the

                        whole file. He can now always update without the extra prompt.

               Member B updates and gets the prompt. If he checksand saves "ignore" and

                        then saves the whole file, he can now always update without the

                        extra prompt, but now Member A lost that privilege and as soon as he

                        updates he gets the extra prompt again.

 

I don't understand what exactly is happening here. Especially because the older files simply work with a table - db data gets imported into an actual Excel table instead of a data model - and that works just fine without any extra prompts.

Is there a way to generally disable this security prompt?

 

I will attach a screenshot of the prompt, in german, though.

 

Thanks for your help in advance.

with best regards, ciradan.

0 Replies