ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Restoring Toolbars and Other Things (https://www.excelbanter.com/excel-programming/329357-restoring-toolbars-other-things.html)

PosseJohn

Restoring Toolbars and Other Things
 
I have a program that uses a custom toolbar exclusively, I hide all other
toolbars. If the user exits the program using the custom menu or toolbar,
the standard toolbars that were displayed previously are restored.

If the user exits my program using ALT-F4, selects the close 'x' button in
the upper right corner, or clicks on the upper left corner and selects close,
the toolbars are not restored as needed/expected.

How can I capture (preferably) or disable these avenues of exit.

Ashman

Restoring Toolbars and Other Things
 
A good way is to put the retore toolbar code in the the ThisWorkbook, under
the procedure workbook_beforeclose.

This will restore the toolbars before excel closes down, whichever way excel
closes.

Jason Ashton

"PosseJohn" wrote:

I have a program that uses a custom toolbar exclusively, I hide all other
toolbars. If the user exits the program using the custom menu or toolbar,
the standard toolbars that were displayed previously are restored.

If the user exits my program using ALT-F4, selects the close 'x' button in
the upper right corner, or clicks on the upper left corner and selects close,
the toolbars are not restored as needed/expected.

How can I capture (preferably) or disable these avenues of exit.



All times are GMT +1. The time now is 12:30 PM.

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