SEARCH

Saturday, January 3, 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)

0 comments:

Post a Comment

Silahkan isikan comment box untuk komentar Anda..