Results 1 to 8 of 8

Pivot table pop ups

Threaded View

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Pivot table pop ups

    I have some code that creates a pivot table the only problem is that two small windows keep poping up on the screen, I thought I could use the Application.DisplayAlerts = False at the begining of the script to disable those windows?

    The windows that pop up are Pivot Table and pivot table field list.
    Here is my code.

    Any Idea what I did wrong?

    Thanks as always ,Mike

    Sub Pivot()
    Stop
    
        Dim Ws As Worksheet, strSource As String
        Dim PT As PivotTable, pc As PivotCache, pf As PivotField
        
            Application.DisplayAlerts = False
            
        For Each Ws In ActiveWorkbook.Worksheets
        
            strSource = Ws.Name & "!R1C1:R5000C4"
            ActiveWorkbook.Worksheets.Add      'new worksheet becomes the active sheet
            'ActiveSheet.Name = "Info"
            
            Set pc = ActiveWorkbook.PivotCaches.Add(xlDatabase, strSource)
            Set PT = pc.CreatePivotTable(Range("A1"))   'pivot table at A1 on new sheet
            
            Set pf = PT.PivotFields("Order Number")
    
            PT.AddDataField pf, "Count of Order Number", xlCount
            PT.AddFields RowFields:="Name"
        Next Ws
            Application.DisplayAlerts = True
            
    End Sub
    Last edited by realniceguy5000; 12-17-2008 at 02:03 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1