Sub Charger_Fichier_TXT()
'
' Effacer_Feuille Macro
'
Feuil2.Activate
Range("A2:L10000").Select
Selection.ClearContents
Range("A2").Select
'
' Charger le Fichier .txt
'
Dim File_Name As Variant
Feuil2.Activate
Range("A2").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\Users\ceol6430\Desktop\Utilisateurs.txt", Destination:=Range("$A$2"))
.FieldNames = False
.PreserveFormatting = True
.RefreshStyle = xlInsertDeleteCells
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileSemicolonDelimiter = True
.TextFileTabDelimiter = False
.Refresh BackgroundQuery:=False
End With
'
' Mise a jour Tableau Croise Dynamique
'
' Tableau croisee dynamique GrpUserId
Feuil5.Activate
Feuil5.Select
Range("A4").Select
ActiveSheet.PivotTables("TcD_Utilisateurs").PivotCache.Refresh
Range("A1").Select
End Sub