LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Posible to speed up query update with Apllication.screenupdating?

I have a 8 sheets with each 8 queries.

I use this macro to actualize all queries:

Sub ActualizarConsultas()
Dim QueryTables As QueryTables
Dim query As QueryTable
Dim ws As Worksheet
Dim i As Integer
Dim vArray As Variant
Dim dteFecha As Date
Dim j As Long

With Application
' .ScreenUpdating = False
.Calculation = xlCalculationManual
End With
'Define names of sheets with queries to be updated
vArray = Array("Brand1", "Brand2", "Brand3", "Brand4", "Brand5", "Brand6",
"Brand7", "Brand8")

'Update queries
For i = 0 To UBound(vArray)
Set ws = Worksheets(vArray(i)) 'Select sheet
For Each query In ws.QueryTables
query.Refresh BackgroundQuery:=False 'Update query
Next
Next
With Application
' .ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
'MsgBox "Terminado", vbInformation, "END"
End Sub

I am afraid to use .ScreenUpdating = True. Could that not cause one query to
overwrite rows of the query right below it because the screen does not update?

TIA

Martin

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running speed of Micrsoft Query with Multiple parameters Ken Excel Discussion (Misc queries) 1 March 19th 07 11:21 PM
VBA Apllication.run and macros when spreadsheet name changes newguyoldguy Excel Programming 5 December 3rd 05 06:55 PM
Code with query goes from greyhound to turtle speed [email protected] Excel Programming 2 October 14th 05 03:41 AM
How can I Improve query speed? John[_60_] Excel Programming 5 October 12th 04 01:00 PM
Apllication.OnTime Mischa Browne[_2_] Excel Programming 8 July 14th 04 08:04 PM


All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"