LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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




 
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 03:51 AM.

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"