ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Enable Macros (https://www.excelbanter.com/excel-programming/409183-enable-macros.html)

Martin M.

Enable Macros
 
Hi,
I wrote script which copy data from one sheet to second sheet, It's
important for this excel sheet. I used method call Auto_Open().
If I open the document, Excel ask user If he want Enable Macros.
I dont want see this dialog and Enable Macros automaticaly, Is it possible?

Mike H

Enable Macros
 
Hi.

You can't do that but there are ways around it and the most common is on
closing the workbook (workbook_Before_Close) make all the sheets except one
xlveryhidden. If a user enables macros then unhide all the worksheets for use
using the workbook_Open event . If macros aren't enabled display the single
unhidden sheet containing a suitable message that the workbook is useless
unless macros are enable

Not bullet proof but not bad either.


Mike

"Martin M." wrote:

Hi,
I wrote script which copy data from one sheet to second sheet, It's
important for this excel sheet. I used method call Auto_Open().
If I open the document, Excel ask user If he want Enable Macros.
I dont want see this dialog and Enable Macros automaticaly, Is it possible?


Martin M.[_2_]

Enable Macros
 
Ok, This is good way :) :)

"Mike H" wrote:

Hi.

You can't do that but there are ways around it and the most common is on
closing the workbook (workbook_Before_Close) make all the sheets except one
xlveryhidden. If a user enables macros then unhide all the worksheets for use
using the workbook_Open event . If macros aren't enabled display the single
unhidden sheet containing a suitable message that the workbook is useless
unless macros are enable

Not bullet proof but not bad either.


Mike

"Martin M." wrote:

Hi,
I wrote script which copy data from one sheet to second sheet, It's
important for this excel sheet. I used method call Auto_Open().
If I open the document, Excel ask user If he want Enable Macros.
I dont want see this dialog and Enable Macros automaticaly, Is it possible?



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

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