Sub créer_TCD()
Dim ws As Worksheet, pvtCache As PivotCache, pvt As PivotTable, Nom_TCD, vDeb$, Source$
Source = ActiveSheet.Name & "!" & Cells(1).CurrentRegion.Address(ReferenceStyle:=xlR1C1)
Set ws = Sheets.Add: vDeb = ws.Name & "!" & ws.[A6].Address(ReferenceStyle:=xlR1C1)
Set pvtCache = ActiveWorkbook.PivotCaches.Create(xlDatabase, Source)
Nom_TCD = CStr(InputBox("Nom du TCD?")): Set pvt = pvtCache.CreatePivotTable(vDeb, Nom_TCD)
End Sub