+ Reply to Thread
Results 1 to 2 of 2

Pivot Table Auto Updation

  1. #1
    Registered User
    Join Date
    09-04-2006
    Posts
    4

    Question Pivot Table Auto Updation

    Hi I tried to update my pivot table using the below code. Every thing is fine when this excel file alone opened.

    When there was multiple excel file this macro is not getting disabled again and again the same file is opening.

    can u give me solution for this....


    Sub Auto_Open()
    Application.OnSheetActivate = "UpdateIt"
    End Sub

    Sub UpdateIt()
    Dim iP As Integer
    Application.DisplayAlerts = False
    For iP = 1 To ActiveSheet.PivotTables.Count
    ActiveSheet.PivotTables(iP).RefreshTable
    Next
    Application.DisplayAlerts = True
    End Sub

  2. #2
    Forum Contributor
    Join Date
    09-04-2006
    Location
    Yorkshire, England
    Posts
    267
    Hi

    Have you tried putting your macro code in:

    Sub workbook_open()

    In the This Workbook sheet in your VBA project.
    Rather than Sub Auto_open.

    Hope it helps
    JR
    Versions
    Mac OS X 'Leopard'
    Mac MS Office Excel 2004
    Windows XP
    MS Excel 2002
    MS Excel 2003

+ Reply to Thread

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