xmr shift.xls | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
3 | AllWorkcentres | StIvesPress2 | ||||
4 | ||||||
5 | UnplannedDownTime | |||||
6 | Date | ShiftDesc | Total | |||
7 | 04/01/2005 | Days12Hour | 273 | 1 | ||
8 | Nights12Hour | 97 | 1 | |||
9 | 05/01/2005 | Days12Hour | 121 | 2 | ||
10 | Nights12Hour | 42 | 2 | |||
11 | 06/01/2005 | Days6-3 | 46 | 3 | ||
12 | 10/01/2005 | Days12Hour | 252 | 4 | ||
13 | Nights12Hour | 690 | 4 | |||
14 | 11/01/2005 | Days12Hour | 627 | 5 | ||
15 | Nights12Hour | 196 | 5 | |||
16 | 12/01/2005 | Days12Hour | 268 | 6 | ||
17 | Nights12Hour | 112 | 6 | |||
18 | 13/01/2005 | Days6-3 | 42 | 7 | ||
19 | Nights12Hour | 23 | 7 | |||
20 | 17/01/2005 | Days12Hour | 219 | 8 | ||
21 | Nights12Hour | 308 | 8 | |||
22 | 18/01/2005 | Days12Hour | 395 | 9 | ||
23 | Nights12Hour | 242 | 9 | |||
24 | 19/01/2005 | Days12Hour | 237 | 10 | ||
25 | Nights12Hour | 97 | 10 | |||
26 | 20/01/2005 | Days12Hour | 50 | 11 | ||
27 | Nights12Hour | 79 | 11 | |||
28 | 24/01/2005 | Days12Hour | 298 | 12 | ||
29 | Nights12Hour | 343 | 12 | |||
PivotTable |
ActiveSheet.PivotTables("Downtime").PivotFields("[All Workcentres]"). _
CurrentPageName = _
"[All Workcentres].[All Workcentres].[Landscape & Walling].[Marshalls L&W].[Southern].[RV - St Ives].[St Ives Flag and kerb dept.].[St Ives Press 1]"
Sub Test()
Dim PItem As PivotItem
Dim Msg As String
For Each PItem In ActiveSheet.PivotTables("Downtime").PivotFields("[All Workcentres]").PivotItems
Msg = Msg & PItem.Name & vbCrLf
Next PItem
MsgBox Msg
End Sub
Marshalls said:It doesnt give a line and no the pivot tbale is not on the active sheet.