Enable Macros

M

Martin M.

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?
 
M

Mike H

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
 
M

Martin M.

Ok, This is good way :) :)

Mike H said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top