PDA

View Full Version : Force users to enable macros in a workbook



FoxProUser
05-05-2009, 03:45 AM
I'm am using the code provided in article #379 of the Knowledge
Base and it says that it has been tested in the 2003 version.

I just tested it in the 2007 version and, not surprisingly,
it did not work. Any suggestions about how to modify this
code so that it will work in the 2007 version?

thanks!

GTO
05-05-2009, 04:54 AM
Greetings,

I do not have 2007, but other than the filefilter needing updated, nothing appears obvious at first glance.

For anyone who might be able to answer, could you be more specific than 'it did not work'? What line did it error/fail at, and presuming your code may not mirror Ken's example exactly, could you post your code?

For anyone looking, here's the link:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=379


Mark

Bob Phillips
05-05-2009, 05:20 AM
The problem is you don't get asked to enabale macros, so the welcome page always opens.

FoxProUser, I would modify the welcome screen to tell the user that there is a button called Options in the formula bar area and they need to enable macros from this.

FoxProUser
05-05-2009, 01:12 PM
Thank you for your response. Here are some clarifications:
1. I just used Ken's code directly from the the Knowledge Base article.
2. I wasn't getting any error messages. When I opened up my test file with macros disabled, nothing was hidden and it did not go to the "Macros" sheet.

mdmackillop
05-05-2009, 01:26 PM
KB Sample file fixed.

FoxProUser
05-05-2009, 02:42 PM
This is working now.

thanks!