Excel 2007 RefreshAll

bob_s

New Member
Joined
Nov 6, 2009
Messages
2
Hello I'm moving from 2003 to 2007 having an issue with a macro that runs when a spreadsheet is opened and does a refresh to all for queries to an access database. It appears after the refresh command the remaining script runs in parrallel or the refreshall trumps the formating. I've used this script in 2003 and works great it's very simple. I've done a search but I've not found the answer. What am I missing? Thanks!

Private Sub Workbook_Open()
ActiveWorkbook.RefreshAll
Columns("B:B").ColumnWidth = 10
Columns("C:C").ColumnWidth = 18
Columns("D:D").ColumnWidth = 15
End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hello and welcome to The Board.
My guess is that you have the Background Refresh option ticked in the queries?
I believe that this is something that you cannot override in VBA.
I use linked tables in my workbooks and, where I want processing (code/calculation etc.) to wait, I untick that option in the query properties.
 
Upvote 0

Forum statistics

Threads
1,215,767
Messages
6,126,781
Members
449,336
Latest member
p17tootie

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