C
CharlesSSQ
Guest
Bonjour,
J'ai un fichier excel avec 8 onglets et j'ai créé un bouton avec une macro pour simplement faire un copier coller valeur de ces onglets et saver le fichier (VALEUR) ailleurs. Bref avoir une copie du classeur mais en VALUE. Voici ce que j'utilise mais ça semble bloquer. Particulièrement à Application.Dialogs()
Merci
Charles
Sub Save_A_Choisir()
Dim Plage As Range, Cel As Range
Dim i As Byte, NombreFeuilles As Byte
Application.ScreenUpdating = False
Application.Dialogs(xlDialogSaveAs).Show CStr("Suivi des indices - Q" & ThisWorkbook.Sheets("Taux de change").Range("A25").Value & " " & Year(ThisWorkbook.Sheets("DATE").Range("C4").Value))
NombreFeuilles = Application.Sheets.Count
For i = 2 To NombreFeuilles
Sheets(i).Select
Set Plage = Range(Cells(1, 1), Cells(56, 27))
For Each Cel In Plage
On Error Resume Next
If IsError(Cel.Value) Then
GoTo Poursuivre
End If
If Cel.Value = "" Then GoTo Poursuivre
If IsNumeric(Cel.Value) Then
With Cel
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
End If
Poursuivre:
Next Cel
Application.CutCopyMode = False
Range("A1").Select
Next i
Sheets(1).Select
Application.Goto Range("A1"), True
End Sub
J'ai un fichier excel avec 8 onglets et j'ai créé un bouton avec une macro pour simplement faire un copier coller valeur de ces onglets et saver le fichier (VALEUR) ailleurs. Bref avoir une copie du classeur mais en VALUE. Voici ce que j'utilise mais ça semble bloquer. Particulièrement à Application.Dialogs()
Merci
Charles
Sub Save_A_Choisir()
Dim Plage As Range, Cel As Range
Dim i As Byte, NombreFeuilles As Byte
Application.ScreenUpdating = False
Application.Dialogs(xlDialogSaveAs).Show CStr("Suivi des indices - Q" & ThisWorkbook.Sheets("Taux de change").Range("A25").Value & " " & Year(ThisWorkbook.Sheets("DATE").Range("C4").Value))
NombreFeuilles = Application.Sheets.Count
For i = 2 To NombreFeuilles
Sheets(i).Select
Set Plage = Range(Cells(1, 1), Cells(56, 27))
For Each Cel In Plage
On Error Resume Next
If IsError(Cel.Value) Then
GoTo Poursuivre
End If
If Cel.Value = "" Then GoTo Poursuivre
If IsNumeric(Cel.Value) Then
With Cel
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
End If
Poursuivre:
Next Cel
Application.CutCopyMode = False
Range("A1").Select
Next i
Sheets(1).Select
Application.Goto Range("A1"), True
End Sub