Excel External Links & Access Connection

mcm52188

New Member
Joined
Apr 30, 2009
Messages
6
Hello, I am looking for help in optimizing an Excel workbook I have. I am using Windows 7 64-bit SP1. Excel 2010. MS Access 2003. This workbook contains links through a shared drive to multiple other excel worksheets. It also contains data connections to Access 2003 select queries. I have VBA that on the workbook open, each link from the external Excel files and each Access query connection is refreshed. The file then saves and closes. The total file size is 13.5MB. The Access queries return about 5,000 records per tab on 6 tabs. The external links have 2,000 records on 3 tabs, and 10,000 records on two tabs. The issue is that the file currently taking anywhere from 2-6 hours to completely update and close the file. Is there a way to optimize the excel file so that it runs faster? On workbook open the VBA that is executed is (this is in the 'ThisWorkbook' object: Private Sub Workbook_Open()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Call UpdateForecastandActuals
Application.ScreenUpdating = True
Application.Quit
End Sub The macro that is called is saved in 'Module1':
Sub UpdateForecastandActuals()
'
' UpdateForecastandActuals Macro
'
'

Application.Calculation = xlManual
Application.Calculation = xlAutomatic
Calculate
Sheets("Frozen Forecast").Select
Calculate
Sheets("Frozen - Commodity Forecast").Select
Calculate
Sheets("Perishable Forecast").Select
Calculate
Sheets("Perishable - Commodity Forecast").Select
Calculate
ActiveWorkbook.RefreshAll

Sheets("Grocery Actuals").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Frozen Actuals").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Perishable Actuals").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Frozen - Commodity Actuals").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Perishable - Commodity Actuals").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("WeeklyPPP").Select
Range("A1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False
Sheets("Grocery Forecast").Select
Range("A1").Select

ActiveWorkbook.save
End Sub
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,216,171
Messages
6,129,284
Members
449,498
Latest member
Lee_ray

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