Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The following is the VBA code which is used to refresh the PivotTable. But I found that it is always failed to reflect newly added data (without any error) after the first refresh. Have anyone have any idea? ================================================== ========= Sub report_refresh() Dim datarange As Variant Sheets("report").Select On Error Resume Next ActiveSheet.PivotTables("Report1").PivotSelect "", xlDataAndLabel datarange = "Data!R1C1:R" & Trim(Str(Worksheets ("Container").Range("max_data").Value)) & "C6" Sheets("Report").Select ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:= _ datarange ActiveSheet.PivotTables("Report1").RefreshTable Application.CommandBars("PivotTable").Visible = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
F9 Calc refresh does not work... | Excel Discussion (Misc queries) | |||
How to refresh dropdown lists in PivotTables? | Excel Discussion (Misc queries) | |||
"Refresh All" won't work with external Access data located on serv | Links and Linking in Excel | |||
Form.Refresh doesn't work...help !! | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming |