Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pp pp is offline
external usenet poster
 
Posts: 10
Default Saving Excel file w/o any data

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Saving Excel file w/o any data

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   Report Post  
Posted to microsoft.public.excel.programming
pp pp is offline
external usenet poster
 
Posts: 10
Default Saving Excel file w/o any data

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving Excel file w/o any data


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   Report Post  
Posted to microsoft.public.excel.programming
pp pp is offline
external usenet poster
 
Posts: 10
Default Saving Excel file w/o any data

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
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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Can i recover my excel file after saving with new data? katieneedshelp! Excel Discussion (Misc queries) 1 August 11th 05 03:13 PM
saving dbf file without losing data govworker Excel Discussion (Misc queries) 0 February 7th 05 11:27 PM
Close file without saving data ExcelMonkey[_96_] Excel Programming 2 March 2nd 04 11:34 PM


All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"