Hopefully some one can help me solve the problem I am having creating a pivot table for a previously created pivot table.

The code for creating the first pivot table is:-

Code:
Sub CreateMonthPivot()
'
' CreateMonthPivot Macro
' Macro recorded 29/04/2004 by Adam Curtis
'
Dim PTCache As PivotCache
Dim PT As PivotTable

Application.ScreenUpdating = False

'Delete MonthPivotSheet if it exists
On Error Resume Next
Application.DisplayAlerts = False
Sheets("MonthPivotSheet").Delete
On Error GoTo 0

'Create a Pivot Cache
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, _
    SourceData:="'2004Febcase'!R1C1:R694C11")



'add new worksheet
Worksheets.Add
ActiveSheet.Name = "MonthPivotSheet"

'Create the pivot table from the cache
Set PT = PTCache.CreatePivotTable( _
    TableDestination:=Sheets("MonthPivotSheet").Range("A1"), _
    TableName:="FebResults")

ActiveWorkbook.Sheets("MonthPivotSheet").PivotTables("FebResults").NullString = "0"
With PT
'add fields
    .PivotFields("Case ID").Orientation = xlRowField
    .PivotFields("Start Date Time").Orientation = xlRowField
    .PivotFields("Start Date Time").Subtotals _
        = Array(False, False, False, False, False, False, False, False, False, False, False, False _
        )
    .PivotFields("Start Date Time2").Orientation = xlRowField
    .PivotFields("Time Type").Orientation = xlColumnField
    .PivotFields("WorkLoad Hrs").Orientation = xlDataField
    
End With
Application.ScreenUpdating = True

ActiveSheet.Range("B3").Group Start:=True, End:=True, By:=1, Periods:=Array(False, _
        False, False, True, False, False, False)
        
ThisWorkbook.Names.Add Name:="rngPivData2", _
        RefersTo:="=OFFSET(MonthPivotSheet!$A$2,0,0,COUNTA(MonthPivotSheet!$G:$G) - 1,COUNTA(MonthPivotSheet!$A2:$II2))", Visible:=True

Call feb01visable
Call CreateFeb01Pivot

Call feb02visable
Call CreateFeb02Pivot

Call feb03visable
Call CreateFeb03Pivot

End Sub
The problem I am getting is on calling createFeb03Pivot. The code in createFeb03Pivot is the same for createFeb01Pivot and feb02. All the code is doing is pivoting the data in the first table on a date and creating a new pivot table using some of the results.

The code for createFeb03Pivot is:-



Code:
Sub CreateFeb03Pivot()

Dim PTCache As PivotCache
Dim PT As PivotTable
Dim startpoint As String

Application.ScreenUpdating = False

ThisWorkbook.Names.Add Name:="rngPivData2", _
        RefersTo:="=OFFSET(MonthPivotSheet!$A$2,0,0,COUNTA(MonthPivotSheet!$G:$G) - 1,COUNTA(MonthPivotSheet!$A2:$II2))", Visible:=True

'MsgBox (ActiveWorkbook.Names("rngPivData2").Value)
'Create a Pivot Cache
Set PTCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, _
    SourceData:=ActiveWorkbook.Names("rngPivData2").Name)


Dim Bcell As Range
   For Each Bcell In Range(lastPostion & ":A62220")
    If IsEmpty(Bcell) Then Exit For
   Next Bcell

startpoint = ActiveWorkbook.Sheets("DayPivotSheet").Range(Bcell.Address).Offset(2, 0).Address
lastPostion = startpoint
'Create the pivot table from the cache
Set PT = PTCache.CreatePivotTable( _
    TableDestination:=Sheets("DayPivotSheet").Range(startpoint), _
    TableName:="Feb03Results2")
    

With PT
'add fields
    .PivotFields("Case ID").Orientation = xlRowField
     .PivotFields("Case ID").Subtotals _
        = Array(False, False, False, False, False, False, False, False, False, False, False, False _
        )
    .PivotFields("Start Date Time2").Orientation = xlRowField
     .PivotFields("Start Date Time2").Subtotals _
        = Array(False, False, False, False, False, False, False, False, False, False, False, False _
        )
    .PivotFields("Grand Total").Orientation = xlDataField
    .PivotFields("Case ID").PivotItems("(Blank)").Visible = False
     
End With
Application.ScreenUpdating = True



End Sub

Now feb01 and feb02 work fine but feb03 doesn't work. The table is created but for some reason it does not pick up the grand total field. I have tested using the named range manually with the wizard and the pivot table for feb03 is created fine but the code I have written doesn't seem to want to pick up the grandtotal field???