ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   close WB after clicking DISABLE MACROS (https://www.excelbanter.com/excel-programming/335529-close-wb-after-clicking-disable-macros.html)

Mario M

close WB after clicking DISABLE MACROS
 
Hi all ,

Is there a way to close a workbook after the user clicks on the "Disable
Macros" button on the security warning screen , instead of opening the
workbook anyway.

Thanks in advance
Mario




Bob Phillips[_7_]

close WB after clicking DISABLE MACROS
 
No because that requires macro code.

An alternative suggestion.

Create a sheet with some text on saying that macros need to be enabled else
the workbook is unusable.
Hide all sheets except this one (in the VBIDE you can very hide them)
Add some workbook_open event code that makes all other sheets visible and
this one not visible (reverse it in the Workbook BeforeClose event and save
it)

If they disable macros, they will just get the warning screen, if they don't
all is well.

--
HTH

Bob Phillips

"Mario M" wrote in message
...
Hi all ,

Is there a way to close a workbook after the user clicks on the "Disable
Macros" button on the security warning screen , instead of opening the
workbook anyway.

Thanks in advance
Mario







All times are GMT +1. The time now is 02:30 AM.

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