Anything on this guys?
I have a workbook with macros and vba code. Now is it possible to check and prompt the user to enable macros when they open this workbook if its not already enabled?
Maybe a prompt to click yes to enable both macros and trust all vba content???
I am using office 2010.
Thank you all.
The basic conundrum is that if macros are disabled, no macro can run to check/force the user to enable them beforehand... you're left with the 'standard' Excel warnings about macros and relying on the user to make the proper choice.
There are ways around this, but they all rely on hiding the sheets leaving only a basic 'introduction' sheet if the user has not enabled macros. There is a discussion about it somewhere on this board, but I can't find it at the moment (perhaps you'd like to try searching?) or you can have a read of this - http://www.cpearson.com/excel/EnableMacros.aspx
I have already looked at that but was wondering if there was any other way of switching it on through one click button for example without going to options.
Thanks for your help though.
Sorry for the very late reply, but here is my solution. It compares the result of a simple UDFunction Plus (simple addition) to that of the +-operator.
I use the TODAY() function because it is volatile and gets updated immediately on opening.
If macros are not enabled an error message emerges to remind you.
My first contribution to this great forum, hope it is still usefull
Another great option is to have a main sheet with the message "Please enable macros" on it. Have all the other sheets hidden on startup. Create a Macro on Workbook Open that hides the Main sheets with the message to enable macros and unhides the others worksheets . That way the only way to use the files is to enable macros.
There are currently 2 users browsing this thread. (0 members and 2 guests)