ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to close a hidden spreadsheet? (https://www.excelbanter.com/excel-programming/351418-how-close-hidden-spreadsheet.html)

Sabine[_4_]

how to close a hidden spreadsheet?
 
I want to close the opened but not visible/hidden excelfile "macros.xls"
without saving when I will close the spreadsheet 'main.xls', leaving
"macros.xls' invisible so the next time it wil be opened it will still be
invisible. This hidden spreadsheet will not be the active sheet when the
macro will be performed.

Who can help me with a short code which I could put between the following
lines :

Private Sub Workbook_BeforeClose(Cancel As Boolean)

End Sub


Thank you in advance!

Sabine



Bob Phillips[_6_]

how to close a hidden spreadsheet?
 
I don't think you will be able to do what you want as visible is not a
workbook property, but a property of the window. As Windows is part of
application, it is not saved when Excel closes.

One way I can think of doing it is to hold a defined name in the nominated
workbook with its window state, set it on closing, and test that on opening.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Sabine" wrote in message
...
I want to close the opened but not visible/hidden excelfile "macros.xls"
without saving when I will close the spreadsheet 'main.xls', leaving
"macros.xls' invisible so the next time it wil be opened it will still be
invisible. This hidden spreadsheet will not be the active sheet when the
macro will be performed.

Who can help me with a short code which I could put between the following
lines :

Private Sub Workbook_BeforeClose(Cancel As Boolean)

End Sub


Thank you in advance!

Sabine






All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com