Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Folks
I have a excel file with VB code and Pivot table in it. When the file loads the code gets executes and data gets populated in the PIVOT Table QUestion: When I save this excel file, is there any way I can save the file w/o any data in it, just the VBCode and the PIVOT Table. The reason I say this is , when the data gets loaded its size grows upto 27MB:) Any help appreciated Thanks PP |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Where is the pivot table getting it's data from? Is the data in a worksheet
or is this data coming from and external source such as from MS Access? -- HTH... Jim Thomlinson "PP" wrote: Hi Folks I have a excel file with VB code and Pivot table in it. When the file loads the code gets executes and data gets populated in the PIVOT Table QUestion: When I save this excel file, is there any way I can save the file w/o any data in it, just the VBCode and the PIVOT Table. The reason I say this is , when the data gets loaded its size grows upto 27MB:) Any help appreciated Thanks PP |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim
On file load excel file connects to SQL Source, and downloads the data into virtual Pivot table and then loads the data on pivot table. There is no worksheet which holds the data, it comes from DB Hope this explains Thanks PP "Jim Thomlinson" wrote: Where is the pivot table getting it's data from? Is the data in a worksheet or is this data coming from and external source such as from MS Access? -- HTH... Jim Thomlinson "PP" wrote: Hi Folks I have a excel file with VB code and Pivot table in it. When the file loads the code gets executes and data gets populated in the PIVOT Table QUestion: When I save this excel file, is there any way I can save the file w/o any data in it, just the VBCode and the PIVOT Table. The reason I say this is , when the data gets loaded its size grows upto 27MB:) Any help appreciated Thanks PP |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A less elegant way to go about your problem is to disable your code upon closing via Workbook_BeforeClose event. Make sure you insert an early line of "Exit clause" in your PivotTable procedure as shown. Your event handler: Private Sub Workbook_BeforeClose(Cancel As Boolean) * SheetX. Range("a65536").value = 99* 'or any text/number, and where SheetX is blank End Sub Sub PivotTbl() If SheetX.Range("a65536").value=99 '(or whatever) then Exit Sub <code End sub -- davidm ------------------------------------------------------------------------ davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645 View this thread: http://www.excelforum.com/showthread...hreadid=395057 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David
Thanks, that gives me a good starting point to look into. Thanks a bunch Thanks PP "davidm" wrote: A less elegant way to go about your problem is to disable your code upon closing via Workbook_BeforeClose event. Make sure you insert an early line of "Exit clause" in your PivotTable procedure as shown. Your event handler: Private Sub Workbook_BeforeClose(Cancel As Boolean) * SheetX. Range("a65536").value = 99* 'or any text/number, and where SheetX is blank End Sub Sub PivotTbl() If SheetX.Range("a65536").value=99 '(or whatever) then Exit Sub <code End sub -- davidm ------------------------------------------------------------------------ davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645 View this thread: http://www.excelforum.com/showthread...hreadid=395057 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
Can i recover my excel file after saving with new data? | Excel Discussion (Misc queries) | |||
saving dbf file without losing data | Excel Discussion (Misc queries) | |||
Close file without saving data | Excel Programming |