PDA

View Full Version : Force enabling macro



yogeshwarv
07-31-2010, 01:39 AM
Hi,

Can somebody help me how to force excel to enable VBA macro?

Regards
Yogeshwar Vats

Bob Phillips
07-31-2010, 03:19 AM
You can't, it would be a pointless security function if you could.


The standard way to approach this is as follows.
- create a worksheet with a message on explaining that for this workbook to
run it needs macros enabled, maybe even a few screenshots
- hide all other worksheets]
- add some code in the Workbook_Open event that un hides the other sheets,
but hides that sheet.


What happens is that if they do not enable macros, they will only see the
warning sheet, telling them how to do it. If the enable macros, it will
startup as the workbook it should be.