1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| Sub Bouton1_Cliquer()
'OK refresh all queries
Dim qt As QueryTable
Dim ws As Worksheet
Dim ActiveFile
ActiveFile = ActiveWorkbook.Name
'On Error Resume Next ---------- Remarked out to help debug
'Application.ScreenUpdating = False ---------- Remarked out to help debug
'Update all query tables
Workbooks(ActiveFile).RefreshAll
' For Each ws In ActiveWorkbook.Worksheets ' ---------- Original code that worked in Excel 2000
If Run("BExAnalyzer.xla!SAPBEXrefresh", True) = 1 Then
Run "BExAnalyzer.XLA!SAPBEXrefresh", True
Call xBEXapi.SAPBEXrefresh(True)
End If
Application.ScreenUpdating = True
End Sub |
Partager