ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Macros through VBA (https://www.excelbanter.com/excel-programming/291368-disable-macros-through-vba.html)

Mirom

Disable Macros through VBA
 
Is there any way to disable macros in the specific Workbook from VBA
code before opening that very same Workbook with VBA code i.e. to open
some workbook in "Disable Macros MODE" using only VBA. Or, to refrase
the question, how should be written in the VBA language, the event
when user manualy opens some workbook and when prompted for macro
virus protection, he clicks the "Disable Macros" buton. For which
"Object"(probably Workbook.VBProject) and what property (something
like "Enable Macros") has changed at that occasion.
Thank You in advance. Regards. Mirom.

teatree[_2_]

Disable Macros through VBA
 
disabling/enabling the macro dialog isn't possible by design. you ca
only kludge your way around it with sendkeys and the like..

--
Message posted from http://www.ExcelForum.com


Dave Peterson[_3_]

Disable Macros through VBA
 
See one suggestion at your other post.


Mirom wrote:

Is there any way to disable macros in the specific Workbook from VBA
code before opening that very same Workbook with VBA code i.e. to open
some workbook in "Disable Macros MODE" using only VBA. Or, to refrase
the question, how should be written in the VBA language, the event
when user manualy opens some workbook and when prompted for macro
virus protection, he clicks the "Disable Macros" buton. For which
"Object"(probably Workbook.VBProject) and what property (something
like "Enable Macros") has changed at that occasion.
Thank You in advance. Regards. Mirom.


--

Dave Peterson


Mirom

Disable Macros through VBA
 
Dave Peterson wrote in message ...
See one suggestion at your other post.


Thank You very much for the answer.
I forget to specify that I am using Excel 2000. Sorry.
Regards. Mirom.


All times are GMT +1. The time now is 05:26 AM.

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