Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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
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
delete info from source file w/out changing the destination file TB New Users to Excel 0 May 26th 08 06:26 PM
Excel 2003 autosave a changing file LeProf Excel Discussion (Misc queries) 2 January 18th 07 12:31 AM
Excel File getting bigger jim28 Excel Discussion (Misc queries) 5 May 25th 06 02:27 PM
Excel 2000 (9.0.6926 SP3) spreadsheet getting bigger & bigger .... Leath Excel Discussion (Misc queries) 2 March 14th 06 06:04 AM
File get bigger when I save in excel Tommy Anderson Excel Programming 2 February 1st 05 06:29 PM


All times are GMT +1. The time now is 10:47 AM.

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"