'Begin Description 'This script adjusts the width of row labels and column labels so that the labels fit on one line -- they don't wrap. 'Requirements: The pivot table on which the script will be run should be selected. 'End Description Option Explicit Sub Main 'Declare SPSS object variables Dim objPivotTableMain As PivotTable Dim objItemMain As ISpssItem Dim bolFoundOutputDoc As Boolean Dim bolPivotSelected As Boolean 'Call GetFirstSelectedPivot to get the selected pivot table 'GetFirstSelectedPivot is a global procedure in Global.sbs(the default Global Procedure file) Call GetFirstSelectedPivot(objPivotTableMain, objItemMain, bolFoundOutputDoc, bolPivotSelected) If (bolFoundOutputDoc = False) Or (bolPivotSelected = False) Then 'either there wasn't an output doc or a pivot table wasn't selected Exit Sub End If objPivotTableMain.ClearSelection Call SetPivotTableColumnLabelsToNoWrap (objPivotTableMain) Call SetPivotTableRowLabelsToNoWrap (objPivotTableMain) ' Deactivate the pivot table and exit objItemMain.Deactivate End Sub