An implementation of Visual Basic that is built into Microsoft products.
Hello to all,
i've got the solution by myself.
***Private Sub Worksheet_PivottableUpdate _
(ByVal Target As PivotTable)
wert = 5 + 1
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = Sheets("pivot").PivotTables(1)
Set pf = Sheets("pivot").PivotTables(1).PivotFields("Kost")
If pf = "Kost" Then
If pf.CurrentPage.Caption = "(Alle)" Then
Application.Undo
MsgBox "Selection 'ÄLLE' is not allowed"
End If
End If
Set pf = Sheets("pivot").PivotTables(1).PivotFields("Ort")
If pf = "Kost" Then
If pf.CurrentPage.Caption = "(Alle)" Then
Application.Undo
MsgBox "Selection 'ÄLLE' is not allowed"
End If
End If
End Sub***
If you have any improvement, please answer here.
Thanks a lot to all.