Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter on Pivotable | Excel Discussion (Misc queries) | |||
PIVOTABLE REPORT | Excel Discussion (Misc queries) | |||
Excel2000...use Ctrl-V, not Paste, in macro to Format Axis in a ch | Charts and Charting in Excel | |||
Pivotable Columns | Excel Worksheet Functions | |||
How to set up a repeating macro to sum values in Excel2000? | Excel Discussion (Misc queries) |