Hello,
I have the following dilemma: I have a database and an excel report with a pivot table that feeds from some tables in that database. I refresh that pivot table daily to obtain new data from the database. I want to create a VBA function in the database to open the excel report to refresh it automatically. Everything works fine (opening excel, running excel’s functions, etc). The problem I am facing is that when function attempts to refresh pivot in excel the pivot cannot access the table in the database because the database is in locked state during execution of the VBA. I hope that makes sense... Is there a way to force VBA to continue code execution (and exit out of function) after making a call to excel's function? Any suggestions are appreciated.
Thanks!!