Hi
in google there is some ways how to wait with the code until the query is done but i wont get them work properly!
'CODE BEFORE IT
With ActiveWorkbook
.Connections("TESURESRV003 PM_T T_Rep_Tab").Refresh BackgroundQuery:=False 'this ''BackgroundQuery:=False'' is not working
'here the code shod wait until query is done
.Connections("tesuresrv003 PM_T Prod_Ord_Rpt_Times").Refresh BackgroundQuery:=False
'same here etc
.Connections("tesuresrv006 StopMaster stoppage_reports").Refresh BackgroundQuery:=False
.Connections("tesuresrv006 KvStoppSetup2 Setup2").Refresh BackgroundQuery:=False
.Connections("tesuresrv006 KvStoppSetup2 KVS_DB").Refresh BackgroundQuery:=False
End With
'CODE AFTER
in the end i will calculate the time for how long each query did last!
Bookmarks