Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB Script help

Hello all,

I need some help. I have an Excel XP spreadsheet with a couple of
pivot tables. I have the tables set not to automatically refresh
because they connect to an Oracle datbase via a ODBC connection and
some users use the file while on the road.

I want to add a command button to the spreadsheet that the user can
click to refresh all pivot tables in the spreadsheet. Yes, i know that
there are tool bars for this, but all users dont have the needed tool
bars enabled and I wanted to make it really easy for everybody by
adding the button in the spreadsheet.

So, can anybody give me an example of the VB code for the click event
to refresh all pivot tables in my Excel file?

Thanks in advance,

Quanchi



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB Script help

Can Anybody help me on this?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VB Script help

See if this works for you:

Dim pc As Excel.PivotCache

For Each pc In ActiveWorkbook.PivotCaches
pc.Refresh
Next pc
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB Script help

Works great...thanks for your help.

Quanchi



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

Reply
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
help with vba script lariveesl New Users to Excel 5 June 6th 09 08:53 AM
Help with the script Angela[_2_] Excel Discussion (Misc queries) 1 March 22nd 08 10:36 PM
help with the VB script Igneshwara reddy[_2_] Excel Worksheet Functions 4 March 6th 07 08:54 PM
I need some VB script please rlee1999 Excel Discussion (Misc queries) 2 October 25th 06 05:46 PM
VB script help - please!! Anthony Excel Discussion (Misc queries) 1 July 13th 05 01:19 AM


All times are GMT +1. The time now is 01:42 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"