LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VB Pivot Table Refresh Excel 97

I have a simple pivot table on one sheet with the data on the second
sheet. I have added a command button and I would like the user to be
able to use it to refresh the data on the pivot table. I have
recorded the action and placed it in the code for the button but it
fails. Here is what I have recorded:

Private Sub rtable_Click()
ActiveSheet.PivotTables("PivotTable1").PivotSelect "'Part
Number'[All]", _
xllabelOnly
ActiveSheet.PivotTables("PivotTable1").refreshtabl e
End Sub

When I manually right click on the table and refresh it works with
noproblem.

When I use the button with code above I get the error:

Run Time error'1004'
RefreshTable methode of PivotTable class failed.

If I only use the second line of code I still get the same error.
What else can I do to get he Table to refresh using VB.

Any help is greatly appreciated.

Thank you,

Darren
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Refresh Closes Excel toast88 Excel Discussion (Misc queries) 0 September 18th 08 01:33 AM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
refresh a new worsheet on pivot table refresh [email protected] Excel Worksheet Functions 0 February 9th 07 07:39 PM
Excel Pivot Table Refresh Question David D Excel Discussion (Misc queries) 2 August 25th 05 01:00 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"