Excel 2016
I have a DataModel that is fed from 9 Excel tables (notPowerQuery). I use VBA to run SQLqueries and dump the results into these 9 tables and then refresh the DataModelwith Thisworkbook.Model.Refresh.
However, not all the tables refresh their data and am at a lossas to how to correct. I’ve verified thatthe raw Excel tables are updating, and even put in calculated columns to theDataModel tables with a simple Now() calculation to check when the DataModel tablesrefresh. The Now timestamp updates onthe DataModel tables but the data from the Excel tables does not get passed/pushedinto the DataModel.
Events, calculations, and screenupdating are turned off atthe start of the macro, but events and calculations are turned back on prior tothe refresh. I’ve tried wrapping therefresh in DoEvents as well.
The only thing that works is to run Thisworkbook.Model.Refreshback to back.
I have a DataModel that is fed from 9 Excel tables (notPowerQuery). I use VBA to run SQLqueries and dump the results into these 9 tables and then refresh the DataModelwith Thisworkbook.Model.Refresh.
However, not all the tables refresh their data and am at a lossas to how to correct. I’ve verified thatthe raw Excel tables are updating, and even put in calculated columns to theDataModel tables with a simple Now() calculation to check when the DataModel tablesrefresh. The Now timestamp updates onthe DataModel tables but the data from the Excel tables does not get passed/pushedinto the DataModel.
Events, calculations, and screenupdating are turned off atthe start of the macro, but events and calculations are turned back on prior tothe refresh. I’ve tried wrapping therefresh in DoEvents as well.
The only thing that works is to run Thisworkbook.Model.Refreshback to back.