Refresh Solution Needed

TK9432

New Member
Joined
Dec 28, 2017
Messages
4
Hello all,

I have an issue where my pivot tables/charts are not refreshing, but the source data is. I'm run an ODBC query, which feeds into a table, that feeds my pivot table.
9
I've seen VB options on running the query, then refreshing tables, but I'm not super savvy with that. Perhaps someone can walk me through it. Also, on query options, I have unchecked "Enable Background Refresh".

Any help would be greatly appreciated.
9

Bryce

9
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
The source data is downloaded to a sheet? If so, you could use Worksheet_Change on that sheet, and determine one target cell that will always change if the source data changes (like a total), and if it changes, make Worksheet_Change Refresh all.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$15" Then 'change address to whatever
ActiveWorkbook.RefreshAll
End If
End Sub

Right click on the sheet that is storing source data, VIEW code and paste the above. Fix "$A$15" to the one cell you know will always change if source changes
 
Upvote 0
Roderick,

Thank you for your quick response. I tried your code this morning, and if i'm doing it correctly, it's not working. I tried a could of different cells that should have their values change, as well as manually changing the value prior to update the query, with no luck. Do you have any ideas for this solution, or perhaps another one?

Thank you,

Bryce
 
Upvote 0
Replying with proper grammar and spelling....

Roderick,

Thank you for your quick response. I tried your code this morning, and if I'm doing it correctly, it's not working. I tried a couple of different cells that should have their values change, as well as manually changing the value prior to updating the query, with no luck. Do you have any ideas for this solution, or perhaps another one?

Thank you,

Bryce
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top