Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.62 KB

Excel.PivotTable.SmallGrid.md

File metadata and controls

60 lines (42 loc) · 1.62 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotTable.SmallGrid property (Excel)
vbaxl10.chm235134
vbaxl10.chm235134
Excel.PivotTable.SmallGrid
ade36fce-e511-f95c-db92-e64271646687
05/09/2019
medium

PivotTable.SmallGrid property (Excel)

True if Microsoft Excel uses a grid that's two cells wide and two cells deep for a newly created PivotTable report. False if Excel uses a blank stencil outline. Read/write Boolean.

Syntax

expression.SmallGrid

expression A variable that represents a PivotTable object.

Remarks

You should use the stencil outline. The grid is provided only because it enables compatibility with earlier versions of Excel.

Example

This example creates a new PivotTable cache based on an OLAP provider, and then it creates a new PivotTable report based on this cache at cell A3 on the active worksheet. The example uses the stencil outline instead of the cell grid.

With ActiveWorkbook.PivotCaches.Add(SourceType:=xlExternal) 
 .Connection = _ 
 "OLEDB;Provider=MSOLAP;Location=srvdata;Initial Catalog=National" 
 .MaintainConnection = True 
 .CreatePivotTable TableDestination:=Range("A3"), _ 
 TableName:= "PivotTable1" 
End With 
With ActiveSheet.PivotTables("PivotTable1") 
 .SmallGrid = False 
 .PivotCache.RefreshPeriod = 0 
 With .CubeFields("[state]") 
 .Orientation = xlColumnField 
 .Position = 0 
 End With 
 With .CubeFields("[Measures].[Count Of au_id]") 
 .Orientation = xlDataField 
 .Position = 0 
 End With 
End With

[!includeSupport and feedback]