| | |
Excel pivot table
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2005
Posts: 2
Reputation:
Solved Threads: 0
Good idea - Sorry!!!
xlApp.ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:="Sheet1!R1C1:R14C3").CreatePivotTable TableDestination:=xlApp.Range("E10"), TableName:="PivotTable2"
xlApp.ActiveSheet.PivotTables("PivotTable2").SmallGrid = False
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Event Date")
.Orientation = xlRowField
.Position = 1
End With
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Product")
.Orientation = xlColumnField
.Position = 1
End With
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Cost")
.Orientation = xlDataField
.Position = 1
End With
xlSheet.Application.CommandBars("PivotTable").Visible = False
xlSheet.Range("G16").Select
xlApp.ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:="Sheet1!R1C1:R14C3").CreatePivotTable TableDestination:=xlApp.Range("E10"), TableName:="PivotTable2"
xlApp.ActiveSheet.PivotTables("PivotTable2").SmallGrid = False
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Event Date")
.Orientation = xlRowField
.Position = 1
End With
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Product")
.Orientation = xlColumnField
.Position = 1
End With
With xlApp.ActiveSheet.PivotTables("PivotTable2").PivotFields("Cost")
.Orientation = xlDataField
.Position = 1
End With
xlSheet.Application.CommandBars("PivotTable").Visible = False
xlSheet.Range("G16").Select
![]() |
Similar Threads
- Is it possible create pivot table and copy to data table using vb.net? (VB.NET)
- Is it possible create pivot table and copy to data table using c#.net? (C#)
- Help on Pivot Table in MS Excel (Windows Software)
- Pivot table in DataGrid (VB.NET)
- PIVOT TABLE Dynamic Column Header? (MS SQL)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: mscomct2.ocx
- Next Thread: Pop3 Mail Watcher (Part 1)
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






