Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It is possible when double clicking on a pivot table to see the underlying results in a new sheet as viewed (zoom) to 85%?

    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You could do the following:

    - At the top of a standard module, insert the following declaration:

    Public fPivot As Boolean

    - In the worksheet module of the sheet containing the pivot table, create the following code:

    Code:
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
      If Not Intersect(Me.PivotTables(1).DataBodyRange, Target) Is Nothing Then
    	fPivot = True
      End If
    End Sub
    - In the ThisWorkbook module of the workbook, create the following code:

    Code:
    Private Sub Workbook_NewSheet(ByVal Sh As Object)
      If fPivot Then
    	ActiveWindow.Zoom = 85
    	fPivot = False
      End If
    End Sub
    I haven't stress-tested the code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •