Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook.close & beforeclose
Hello,
I’ve searched the groups, but can’t seem to find anything that quite addresses this, hoping someone can tell me where I’m going wrong. I have the following code in the BeforeClose event : Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim wk As Worksheet For Each wk In ThisWorkbook.Worksheets wk.Visible = xlSheetVisible Next wk End Sub When I close the workbook manually, it works as expected. But if I run “ThisWorkbook.Close savechanges:=False” from a procedure, it doesn’t. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
'BeforeClose' code problems:book won't close if more than one book is open | Excel Programming | |||
Need code to close minimized workbooks in BeforeClose event | Excel Programming | |||
Close workbook with "Cancel=TRUE" in the BeforeClose()" | Excel Programming | |||
Workbook BeforeClose Bug | Excel Programming | |||
File won't close when "beforeclose" event is used. | Excel Programming |