Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Trouble refreshing PivotTables w/ VBA

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Canada
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    Hello all.

    I'm trying to refresh PivotTables from a macro, using the folowing code:

    Sheets("PTable").PivotTables("PivotTable1").RefreshTable

    When I step through the macro (using F8), this line executes fine and refreshes the PivotTable successfully. However, when I run the macro from a button on the sheet, the PivotTable does not get refreshed.

    Any ideas? I'm stumped.

    Thanks.



    [ This Message was edited by: Arvi on 2002-05-13 09:54 ]

  2. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Arvi,

    This may be a bit of "shooting in the dark," but I've had problems like this that went away when I switched from ActiveX commandbuttons (buttons that come from the Controls toolbar) to Forms buttons (buttons from the Forms toolbar). If you are using the ActiveX type I would recommend you try using the Forms type instead.
    Keep Excelling.

    Damon

    VBAexpert Excel Consulting
    LinkedIn Profile http://www.linkedin.com/pub/damon-ostrander/7/79/a93
    AllExperts Profile http://www.allexperts.com/ep/1059-30...-Ostrander.htm

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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