'Create the Pivot Table
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R40C27").CreatePivotTable TableDestination:="", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
'Set up columns
With ActiveSheet.PivotTables(1).PivotFields("1/1/2006")
.Orientation = xlColumnField
.Position = 1
End With
With ActiveSheet.PivotTables(1).PivotFields("2/1/2006")
.Orientation = xlColumnField
.Position = 2
End With
With ActiveSheet.PivotTables(1).PivotFields("3/1/2006")
.Orientation = xlColumnField
.Position = 3
End With
With ActiveSheet.PivotTables(1).PivotFields("4/1/2006")
.Orientation = xlColumnField
.Position = 4
End With
'Hide the field list
ActiveWorkbook.ShowPivotTableFieldList = False