PDA

View Full Version : Combining vba for forcing macros and expiry



wetpaint
10-21-2009, 12:51 PM
Honestly, I have absolutely no idea what I'm doing. My boss has asked me to put some vba into the workbook he is selling to force the "demo" to close with a msgbox prompting the end user to visit his site and purchase the full copy. I managed to do this (although, I had to do it with a specific date instead of a range of days which would be a better solution) with a lot of help from the articles on this site. And it took me like, three weeks. But now, I believe I have to force macros to be enabled to have this work? I tried to copy into ThisWorkbook the code from an article here that is supposed to do that but, when I paste it in above the previous code for the expiry everything stops working. I'm using 2007. I am so completely frustrated and at a loss here. Could someone please help? Remember that I know nothing about vba at all. At All. So, I could really use some hand holding and small words. Thank you so much for any advice you can give.

Bob Phillips
10-21-2009, 12:54 PM
You cannot force macros to be enabled, that would blow the security wide open. If you put your code into an addin, that doesn't ask to enabled after installing.

wetpaint
10-21-2009, 01:00 PM
So, you're saying that the entire thing should be an add in? Do you know of anywhere on the web that I can learn to do this relatively easily? Thank you for your response.

Bob Phillips
10-21-2009, 01:10 PM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrbuildingapplicationspecificaddins.asp
Building Application Specific Add-Ins

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrexceladdins.asp
Excel Add-Ins

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovraddinstemplateswizardslibraries.asp
Add-ins, Templates, Wizards, and Libraries