Search This Blog

Sunday, January 4, 2015

Excel VBA activeworkbook refreshall WAIT until finished

Sometimes you need the delay or waiting excel VBA code till all the workbook refreshing methode is finished


For i = 1 To ActiveWorkbook.Connections.Count
    ActiveWorkbook.Connections(i).ODBCConnection.BackgroundQuery = False 'for odbc
    'ActiveWorkbook.Connections(i).OLEDBonnection.BackgroundQuery = False 'for oledb
    'MsgBox ActiveWorkbook.Connections(i).OLEDBConnection.BackgroundQuery
Next
    ActiveWorkbook.RefreshAll
   


Thanks,

Regards

Hery ( Freelance Excel VBA Trainer 081223344506)

No comments:

Post a Comment