Sub a()
MsgBox Sheets(Sheets.Count).Name
MsgBox Sheets(Sheets.Count).Previous.Name
End Sub
Sheets(Sheets.Count - 1).Activate
Sub classeur()
Dim wk As Workbook
Dim ws As Worksheet
Set wk = Workbooks.Add(xlWBATWorksheet)
Set ws = ThisWorkbook.Worksheets(Sheets.Count - 1)
ws.Copy After:=wk.Sheets(Sheets.Count)
Dim nom, chemin As String
nom = MonthName(Month(Date) - 5) & "_" & MonthName(Month(Date) - 1) & "_" & "test"
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
Set ws = ThisWorkbook.Worksheets(Sheets.Count - 1)
Sub a()
Dim strPath As String
Dim t As Variant, WBK As Workbook
strPath = ThisWorkbook.Path & "\"
t = Array(Sheets(Sheets.Count).Name, Sheets(Sheets.Count).Previous.Name)
Sheets(t).Copy
Set WBK = ActiveWorkbook
WBK.SaveAs strPath & Format(Date, "mmmm-yyyy") & ".xlsx", 51
'finalement je me corrige moi-même ;-)
WBK.Close True
End Sub