Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default pivotable excel2000 macro

i want to build a macro that chacks if pivotable(1)
is already refreshed.
if yes do....
if not do...



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default pivotable excel2000 macro

Here's a macro for refreshing all pivot tables in a workbook. Hope this
helps.
Gary Brown

Sub PTRefresh()
'Refresh all pivot tables on this worksheet one at a time
'
Dim iSheets As Long, x As Long
Dim iPivot As Long, strCurrentSheet As String

On Error GoTo Exit_PTRefresh

'Count number of sheets in workbook
iSheets = ActiveWorkbook.Sheets.Count

'remember current sheet
strCurrentSheet = ActiveSheet.Name

If Windows.Count = 0 Then GoTo Exit_PTRefresh

For x = 1 To iSheets

'go to a worksheet to refresh pivot tables
Sheets(x).Activate

'turn warning messages off
Application.DisplayAlerts = False

'refresh all pivot tables on this worksheet one at a time
For iPivot = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iPivot).RefreshTable
Next

'turn warning messages on
Application.DisplayAlerts = True

Next

'return to worksheet that you were originally at
Application.ActiveWorkbook.Sheets(strCurrentSheet) .Activate

Exit_PTRefresh:
Application.DisplayAlerts = True

End Sub



"chaim rozent" wrote in message
...
i want to build a macro that chacks if pivotable(1)
is already refreshed.
if yes do....
if not do...



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default pivotable excel2000 macro

This one Refreshes all external data ranges and PivotTables in the workbook.

Thisworkbook.RefreshAll

--
Regards,
Tom Ogilvy

"chaim rozent" wrote in message
...
i want to build a macro that chacks if pivotable(1)
is already refreshed.
if yes do....
if not do...



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default pivotable excel2000 macro


thank you for the quick answare
but i want only to chack, and not to refresh.
i have to make some operations before the refreshing
so the macro must identify if the pifotable was refreshed
or not
can you help me to build such macro?

thank you
rozent


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Filter on Pivotable tran1728 Excel Discussion (Misc queries) 0 May 31st 10 06:01 PM
PIVOTABLE REPORT ad2ad79 Excel Discussion (Misc queries) 1 January 29th 10 01:44 PM
Excel2000...use Ctrl-V, not Paste, in macro to Format Axis in a ch MacroPete Charts and Charting in Excel 6 March 24th 07 12:07 AM
Pivotable Columns Jim Pockmire Excel Worksheet Functions 1 October 29th 06 07:37 PM
How to set up a repeating macro to sum values in Excel2000? crankypants in Washington Excel Discussion (Misc queries) 2 October 23rd 06 09:41 PM


All times are GMT +1. The time now is 04:10 PM.

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

About Us

"It's about Microsoft Excel"