![]() |
|
|
|
#1
|
||||
|
||||
|
Aside from any issues to do with making the Workbook_BeforeClose macro work correctly, what would probably be a better approach is to intercept the workbook's Save event, via a Workbook_BeforeSave macro. That way, you can:
(a) capture the current visibility state for your worksheet; (b) hide the worksheet; (c) save; (d) restore the pre-save visibility; and, finally (e) set .Saved = True That way, you don't need a Workbook_BeforeClose macro, since what's saved will always have the hidden setting (i.e. users will be unable to save the workbook with the sheet visible, even though they may be able to see it).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Hi Paul,
maybe that's a good workaround: as soon as my new notebook is set up, I'll try it. Thanks NP |
|
#3
|
|||
|
|||
|
Hi Paul,
PROBLEM SOLVED! Thanks for the 'Before_Save' workaround (... although, I'd really like to understand why the Before_Close doesnt work ...) Cheers NP |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
From an XL sheet ,how to keep the group of columns which match with other XL sheet
|
Zubairkhan | Excel | 2 | 03-04-2014 10:57 PM |
| sheet 2 data highlight in sheet 1 | gsrikanth | Excel | 1 | 04-21-2012 06:25 PM |
Construct a summary sheet by summing up from one or more than one sheet.
|
PRADEEPB270 | Excel | 1 | 11-04-2011 03:46 AM |
| Hiding text | Reg06 | Visio | 0 | 01-15-2011 08:04 AM |
| copy cell from sheet 2 to sheet 3 macro | slipperyjim | Excel Programming | 1 | 02-18-2010 01:31 AM |