Refresh data table via vba????

jrmunge

New Member
Joined
Aug 23, 2011
Messages
3
Hi,
Can anyone help me out with a code on how to refresh a data table via vba. My workbook has been set to automatic recalculation(except data tables) due to speed issues. I need to have a macro that I can call whenever I want the data table refreshed. Please help me out.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Assuming that the data table starts in A1, Sheet1 you could do something like:

Sheets("Sheet1").Range("A1").CurrentRegion.Calculate

Denis
 
Upvote 0
Sorry, I was thinking recalculation rather than refreshing a table. Try...

Code:
Sheets("Sheet1").Range("A1").Select
ActiveWorkbook.RefreshAll

Denis
 
Upvote 0
If you only have one table, f9?
 
Upvote 0
This did not work at my end, I want to refresh a data table selectively from a workbook which has 12 datatables.
Is that possible?


Sorry, I was thinking recalculation rather than refreshing a table. Try...

Code:
Sheets("Sheet1").Range("A1").Select
ActiveWorkbook.RefreshAll

Denis
 
Upvote 0
Proposed Strategy, using VBA:

Step 1 delete all tables but not the table you want to refresh
Step 2 refresh sheet
step 3 restore all table that you deleted

This did not work at my end, I want to refresh a data table selectively from a workbook which has 12 datatables.
Is that possible?
 
Upvote 0
I understand that this thread is old, but Google got me here and what I ended up finding elsewhere may be helpful to others here:

Code:
Worksheets("SheetNameHere").ListObjects("TableNameHere").Refresh

This did not work at my end, I want to refresh a data table selectively from a workbook which has 12 datatables.
Is that possible?
 
Upvote 0
A data table is not the same as a Table (Listobject). The former is comprised of a grid of =TABLE() formulas.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,432
Members
448,961
Latest member
nzskater

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