Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003 file gets 25% bigger after changing TP source with VBA
Could someone tell me why is the file is getting bigger?
This is my code: Sub test() Dim pt As PivotTable Dim ws As Worksheet tmp = "" tmp1 = "" Application.EnableEvents = False Application.DisplayAlerts = False Application.EnableEvents = False For Each ws In ActiveWorkbook.Worksheets Range("C12").Select For Each pt In ws.PivotTables tmp = pt.SourceData tmp1 = Replace(tmp, "2011-2012", "2012-2013") 'MsgBox ws.Name ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:=tmp1 ActiveWorkbook.ShowPivotTableFieldList = False Application.CommandBars("PivotTable").Visible = False tmp = "" tmp1 = "" Sheets(ws.Name).Select Next pt Next ws Application.Calculation = xlAutomatic Application.EnableEvents = True Application.DisplayAlerts = True Application.EnableEvents = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete info from source file w/out changing the destination file | New Users to Excel | |||
Excel 2003 autosave a changing file | Excel Discussion (Misc queries) | |||
Excel File getting bigger | Excel Discussion (Misc queries) | |||
Excel 2000 (9.0.6926 SP3) spreadsheet getting bigger & bigger .... | Excel Discussion (Misc queries) | |||
File get bigger when I save in excel | Excel Programming |