Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
I'm not sure i understand your point. The Before close event executes only when a user has decided to close and does nothing to prevent or require that user to save even if that user has destroyed or messed up the data. The same risk of lost data would exist with nothing in the before close event or any macros at all. Mike "Dave Peterson" wrote: I wouldn't hide the sheet when the workbook closes. After your code hides it, your code will have to save the workbook. If the user opened the workbook and destroyed 90% of the data and decides to close without saving, your code just screwed up the workbook. Instead, I'd hide the worksheet when the workbook opens. Option Explicit Sub Auto_Open() thisworkbook.worksheets("Somesheetname").visible = xlsheethidden end sub You could use the workbook_open event if you wanted instead. Leanne wrote: I want a sheet to be hiden when the file is closed. I have done the code to unhide it should the user require but because of this I want it hiden again when the file is closed (if it has been unhiden) Can any one tell me where/how I write this? -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Looks for Cell Contents & Performs Action | Excel Programming | |||
Calling a macro from a closed file | Excel Programming | |||
Run macro when file is opened and closed | Excel Programming | |||
How to create a macro which performs a copy-and-paste task every 5mins after data is refreshed from web page? | Excel Worksheet Functions | |||
How to change macro so it performs actions on ACTIVE sheet? | Excel Discussion (Misc queries) |