Option Explicit
Sub test()
Dim i As Long
Dim Liste As String
With Sheets("Feuil1")
With .PivotTables("Tableau croisé dynamique1").PivotFields( _
"batiment ")
For i = 1 To .PivotItems.Count
If .PivotItems(i).Visible = True Then
Liste = Liste & " " & .PivotItems(i).Name
End If
Next i
End With
.Range("H2") = Liste
End With
End Sub