gosselien
XLDnaute Barbatruc
Bonjour,
mon code est celui ci et j'ignore pourquoi il se plante:
Il y a qq un qui peut me dire pourquoi ?
Ca fonctionnait en XL 2003
Merci
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
' IL S'ARRETE SUR "ME"
Me.PivotTables("Tableau croisé dynamique1").ShowPages PageField:= _
"Discipline sportive"
For i = Sheets.Count To 1 Step -1
If Sheets(i).Name <> Me.Name Then
Sheets(i).Move
With ActiveWorkbook
With .ActiveSheet.UsedRange
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
.SaveAs ThisWorkbook.Path & "\" & ActiveSheet.Name & ".xls"
.Close False
End With
End If
Next i
End Sub
mon code est celui ci et j'ignore pourquoi il se plante:
Il y a qq un qui peut me dire pourquoi ?
Ca fonctionnait en XL 2003
Merci
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
' IL S'ARRETE SUR "ME"
Me.PivotTables("Tableau croisé dynamique1").ShowPages PageField:= _
"Discipline sportive"
For i = Sheets.Count To 1 Step -1
If Sheets(i).Name <> Me.Name Then
Sheets(i).Move
With ActiveWorkbook
With .ActiveSheet.UsedRange
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
.SaveAs ThisWorkbook.Path & "\" & ActiveSheet.Name & ".xls"
.Close False
End With
End If
Next i
End Sub