Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with a macro below. Within a worksheet I have a number of
tables linked to an access query and would like a macro to refresh all of these tables at once to pull the new data into my 'master' worksheet. Each week however this worksheet is copied and renamed for audit purposes. However when I run the macro below it updates the data in all of these archived sheets as well. So in my macro I either want to tell it to refresh the data in just the 'master' worksheet, or prevent it from updating data in the archived worksheets. Thanks Sub Refresh_all_queries() ' ' Refresh_all_queries Macro ' ' ActiveWorkbook.RefreshAll Range("F27").Select MsgBox "All data should have now been refreshed, please ensure that the month to date figures are also completed.", vbInformation End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I suspect that settign the pivot table backgroundQuery property to FALSE
might solve your problem If not, you might want to chaneg how the data is fetched - so that in code used ADODB rather than usign a worksheet query table. "Andy" wrote: I have a workbook with a macro below. Within a worksheet I have a number of tables linked to an access query and would like a macro to refresh all of these tables at once to pull the new data into my 'master' worksheet. Each week however this worksheet is copied and renamed for audit purposes. However when I run the macro below it updates the data in all of these archived sheets as well. So in my macro I either want to tell it to refresh the data in just the 'master' worksheet, or prevent it from updating data in the archived worksheets. Thanks Sub Refresh_all_queries() ' ' Refresh_all_queries Macro ' ' ActiveWorkbook.RefreshAll Range("F27").Select MsgBox "All data should have now been refreshed, please ensure that the month to date figures are also completed.", vbInformation End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to Refresh inbound data sheets, then Refresh Pivot Tables | Excel Programming | |||
Refresh Query Table causing debug error with Background Refresh pr | Excel Programming | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming |