Bonjour,
pour le code vba, est ce que c'est cela ?
Sub Importation()
'
' Importation Macro
' Macro enregistrée par Noeste
'
' Touche de raccourci du clavier: Ctrl+a
'
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/1%20Physique.html' _
, Destination:=Range('A1'))
.Name = '1%20Physique'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('M1').Select
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/2%20Mental.html' _
, Destination:=Range('M1'))
.Name = '2%20Mental_32'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('Y1').Select
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/3%20Technique.html' _
, Destination:=Range('Y1'))
.Name = '3%20Technique'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('AL1').Select
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/4%20Gardien.html' _
, Destination:=Range('AL1'))
.Name = '4%20Gardien'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('AZ1').Select
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/5%20D%E9fensif.html' _
, Destination:=Range('AZ1'))
.Name = '5%20D%E9fensif'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('BM1').Select
With ActiveSheet.QueryTables.Add(Connection:= _
'FINDER;file:///C:/Documents%20and%20Settings/Stephane/Bureau/ANALYSE%20STATS%20FM%202005/NOESTATS/6%20Offensif.html' _
, Destination:=Range('BM1'))
.Name = '6%20Offensif'
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range('BM:BO,AZ:BB').Select
Range('AZ1').Activate
Selection.Delete Shift:=xlToLeft
Columns('AL:AN').Select
Columns('Y:Y').ColumnWidth = 4.14
Range('AL:AN,Y:AA').Select
Range('Y1').Activate
Selection.Delete Shift:=xlToLeft
Range('A:B,M:O').Select
Range('M1').Activate
Selection.Delete Shift:=xlToLeft
Range('AO:AO,AP:AP').Select
Range('AP1').Activate
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
Range('AO:AO,AP:AP,BG:BG,BB:BB,AY:AY,AV:AV,BE:BE,AW:AW,AU:AU,AR:AR,AQ:AQ,AT:AT' _
).Select
Range('AT1').Activate
Selection.Delete Shift:=xlToLeft
Cells.Select
Selection.Replace What:='-', Replacement:='0', LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Cells.Select
Selection.Copy
Sheets('Report Macro').Select
ActiveSheet.Paste
Range('A1').Select
Sheets('Macro Ctrl a').Select
Range('A26').Select
Application.CutCopyMode = False
Selection.ClearContents
Cells.Select
Selection.ClearContents
Selection.QueryTable.Delete
Range('A1').Select
Sheets('Macro Ctrl a').Select
Msg = ' N'oublies pas sauvegarder ton fichier sous un autre nom'
Title = ' Salut '
Style = vbOKOnly + vbInformation
Reponse = MsgBox(Msg, Style, Title)
End Sub